How can I draw multiple different size circle on the same screen?

Hi,
Can you help on this topic? How will I create many shape (do � need array or something)?
Please help,thank you...

import java.awt.*;
public class DrawingWithParameters {
public static void main(String[] args) {
     DrawingPanel dp = new DrawingPanel();
Container cp = dp.getContentPane();
     cp.add(dp);
dp.setBackground(Color.LIGHT_GRAY);
Graphics g = dp.getGraphics();
drawCar(g, 10, 30);
drawCar(g, 150, 10);
public static void drawCar(Graphics g, int x, int y) {
g.setColor(Color.BLACK);
g.fillRect(x, y, 100, 50);
g.setColor(Color.RED);
g.fillOval(x + 10, y + 40, 20, 20);
g.fillOval(x + 70, y + 40, 20, 20);
g.setColor(Color.CYAN);
g.fillRect(x + 70, y + 10, 30, 20);
Why "DrawingPanel" gives warning?
Warning: DrawingPanel cannot be resolved to a type
I tried many basic codes with DrawingPanel but it doesn't work.I just only want to draw many different size circles.

Similar Messages

  • How can I attach multiple filled-form PDFs to the same outgoing email on iPhone/iPad?

    How can I attach multiple filled-form PDFs to the same outgoing email on iPhone/ iPad?

    This isn't supported in the current version of Adobe Reader on iPhone/iPad.
    Shradha

  • HT4865 How can I have multiple icloud email accounts using the same rescue email account.

    I have several Iphones for my business for managers to use.
    I would like to set them up to send me the recovery emails but it seems only one icloud address can do that.
    Is it possible to have multiple icloud email accounts using the same - seperate recovery email address?

    Unfortunately, you cannot change your primary @me.com or @icloud.com email address, you could however create an alias or create a completely new account.

  • How can I always have popup windows appear on the same screen as PS?

    Hi,
    I'm hoping someone can help me out. I have 3 displays connected to my computer, 1 of which is a tablet screen I don't use all the time. (It gets disabled and put away when I turn on SLI for video gaming, or if I just dont need to draw anything at the moment)
    If I'm drawing something, I'll drag photoshop over to that 3rd screen and do my work. Later, if I want to just crop or resize an image or do simple image manip stuff, I'll drag the window back over to one of my other two screens. The problem I'm facing is that popup dialogs like the open file, save as, preferences; any new window that photoshop opens, appears on whatever monitor it did last time.
    Is there a way to force photoshop to always show those windows centered or at least on the same screen the rest of the program is working on? I've been searching for a while and the closest thing I found was a setting called 'Remember Palette Locations', but it looks like that setting was removed in CS5.
    I'm willing to change preferences, run some kind of reset script any time photoshop starts, or whatever, just something that will bring those new windows onto the screen I'm working on instead of where they last were. I sat perplexed for about 1 minute when I saved a picture as PNG. Went to upload it and.. ohp! it hasn't changed! Oh! There is an interlace option dialog is showing on a screen thats TURNED OFF >_>
    Computer info:
    2x 24" DELL Monitors (main screens)
    1x 19" Yiynova Tablet Dispay (used only when drawing)
    2x Nvidia GTX 560Ti Graphics Cards
    Windows 7 64bit
    Adobe Production Premium CS5.5
    Message was edited by: Barrakoda - Added computer info

    Your graphics driver's dialog repositioning option? Check that.
    Mylenium

  • How can I save multiple tabs to open at the same time?

    Hi,
    I have a set of websites that I need to access regularly and I'd like to be able to open all the tabs in a window at the same time rather than clicking on each one individually.  I know this was possible in previous safari versions but I can't figure out how to do it in Yosemite (v8).
    Can someone walk me through how to do this please?  I've googled this but haven't been able to find an answer for this latest version of safari.
    Thanks!

    Try one of these extensions for multiple cookie sessions.
    Multifox: <br />
    http://br.mozdev.org/multifox/ <br />
    Cookie Swap extension: <br />
    https://addons.mozilla.org/firefox/3255/ <br />
    Cookie Pie extension: <br />
    http://www.nektra.com/oss/firefox/extensions/cookiepie/

  • How can we enable multiple people to work on the same Xcelsius file

    I want to enable multiple people work on the same file as I am working on. How Can I achieve this task?

    Hi Jain,
    I dont think there is a logic behind your requirement.  If multiple persons are allowed to work on one file, then whose modification has to get saved as a final copy.  Even in MS office documents also, you will be notified/prompted if you are opening at the same time some one else is already working on the same.  Please clarify your requirement more.
    If i presume that if you are talking about the Xcelsius output file such as word, pdf, etc.,. then it is clear that all can open the same file in read only mode except the one who is opening the same First.  Anyhow they cannot modify the SWF contents.  Only header or footer can be inserted.
    Hope this is clear.  Please revert on your exact requirement.
    With best wishes
    BaaRaa.

  • How can I have multiple I-tunes accounts on the same computer?

    So I have a mac, and my brother has his i-tunes account on it. Earlier today I set up my mom's account. All of my brother's songs were on her account, and when I deleted a song from her library, it was also deleted from my brother's library! My mom wants to upload all of her CD's onto her account, but if it is also going on my brother's account, he won't have anymore space for his songs. Is this normal? How do I get these two accounts to have nothing to do with each other? They don't want the same songs as one another.

    pattimihm wrote:
    he won't have anymore space for his songs. Is this normal?
    Yes. Get an external hard drive if you need more space.
    Everybody should have their own copies. Sharing copies of music does not work for long, since one person's change can affect others, as you observed.

  • How can I make multiple PDF links open in the same second tab, instead of a 3rd, 4th etc.

    I am working on a project for my Universities 125 year anniversary.  Essentially I've created a 125 year long digital yearbook, with a link to the University's actual digital yearbook for each individual year.  I'm wondering if there is a way that I can make all of the yearbook links open in the same second page.
    IE:  Main Project open in a window,  when I click the 1939 Yearbook pdf hyperlink, the 1939pdf will open in the second window.  I then want to find a way so that after this, on the main page, I can click the 1940 yearbook pdf link and have the 1940 yearbook load on the second window, replacing the 1939pdf, instead of just opening the 1940pdf on a third new tab/window?
    Note: I have all of the yearbook PDF's online and downloaded, so I can make the hyperlink send you to the site, or do a download style thing. 
    Thank for any help, and if anyone needs further information just ask me!

    Hi
    Please take a look to this thread Re: Can I refresh the browser rather than open a new tab?

  • How can I align two different text row in the same table in two different way (one centered and the other one on the left)?

    Hi,
    I want to center two different text row that are in the same table but one on the center and the other one on the left. I put a <span> tag hoping that it has been overwhelmed the table's class properties The .bottomsel's font-family and the .Cig84's font-family and colour work but the text-align don't: they're both on the left.
    These are my source and CSS codes:
    Source:
    <table width="600" border="0">
      <tr>
        <td class="bottomref"><p><span class="bottomsel">| <a href="index.html" target="_self">Main</a> | <a href="about.html" target="_self">About</a> | <a href="clients.html" target="_self">Clients</a> | <a href="contact.html" target="_self">Contact</a> |</span><br />
          <span class="credits">Credits: <span class="Cig84">Cig84</span></span></p></td>
      </tr>
    </table>
    CSS:
    .bottomsel {
      text-align: center;
      font-family: Georgia, "Times New Roman", Times, serif;
    .credits {
      text-align: left;
    .Cig84 {
      color: #F00;
      font-family: "Comic Sans MS", cursive;

    Use paragraph tags with CSS classes.
    CSS:
         .center {text-align:center}
         .left {text-align:left}
    HTML:
    <table width="600" border="0">
      <tr>
        <td class="bottomref">
              <p class="center">This text is center aligned</p>
              <p class="left">This text is left aligned</p>
        </td>
      </tr>
    </table>
    Nancy O.

  • How can I use two different page orientations in the same document?

    I am trying to have both portrait and landscape page orientations in the same document.  Pages doesn't seem to like this.  Is there a way?

    I tried to comment on another thread about this same issue, but the thread was closed.
    In the other thread; however, some asked why rotating one pages was necessary, and if they knew then maybe there would be reason to create the function.
    Well, I don't know about why anyone else needs it, but for me it's for the papers I have to write for my masters program. The professors like to have the rubric attached to the bottome of the document so they easily grade and keep things organized. They of course give directions on how to easily change the orientation of the last page in Word, but not all of use Word, or even want to use Word. Maybe I need to ditch Pages and go to Word? I'd really hate to do that!
    So, come on Apple, let's get this feature added, stat!

  • Can you have two different itunes account on the same computer

    how can you have 2 different itunes accounts on the same computer?

    You would need two seperate users on the computer. Then each library would be independent of each other. Or do you mean two seperate iTunes store accounts?

  • I have many photos with file extension of .PDD and that Photo Deluxe 4 no longer will operate in Win 7. How can I open?  Next in Elements 11, how do I load and print different pictures and different sizes options on the same page?

    I have many photos with file extension of .PDD and that Photo Deluxe 4 no longer will operate in Win 7. How can I open?  Next in Elements 11, how do I load and print different pictures and different sizes options on the same page?
    Thanks,
    Shir

    sbmgrams wrote:
    I have many photos with file extension of .PDD and that Photo Deluxe 4 no longer will operate in Win 7. How can I open?
    See here:
    Reading PhotoDeluxe PDD Files

  • Can you have multiple Apple TV's in the same house and network? If so how do you know which one to pick from your Idevice?

    can you have multiple Apple TV's in the same house and network? If so how do you know which one to pick from your Idevice?

    Yes, there are even defaults for naming them, such as LivingRoom, Bedroom, etc, or you can even enter your own name with the remote for each AppleTV.

  • How can I draw a line in Preview without the arrow head

    Hello all!
    How can I draw a line in Preview without the arrow head at the end of the line?

    Yes. Once you select the line bar a new entry will appear where you can select what type of line. Based on my experience whether or not it will change is iffy.

  • Can we have two different itunes accounts on the same mac?

    Can we have two different itunes accounts on the same account? I am having trouble accessing mine from my sons.

    Yes you can.
    The fact you cannot access your son's library from your User account is intentional. User accounts on your Mac are nearly as separate from each other as your Macs are from anyone else's on the planet. To copy music from his account to yours, first copy it to the Shared folder, then log into your account and import the music. Then, you can erase it from Shared.
    The Shared folder exists at /Users/Shared.
    Read
    iTunes: How to share music between different accounts on a single computer
    OS X Mavericks: Set up users on your Mac

Maybe you are looking for

  • Acrobat 8 right click

    I can't get the right click option (convert/combine) pdfs. I have Windows 7 and Acrobat 8 pro any help?

  • Usage of Fault Message Types

    Hi Champs. Need your help. I want to know if we can use the Fault message types for the following scenario:- Any Async-to-Async scenario, with no proxies and with no BPM. If yes, then how to use it? By principle, I feel that we can use it for the abo

  • Satellite L655-S5146 low sound

    I just got this laptop but the sound is too low even though the volume slider is set to 100%. This doesn't change even with headphones. How can I fix this??

  • How can I buy multiple licenses of Apple software to be insalled in other computeres

    How can I buy multiple licenses of Apple software to be insalled in other computeres? I need to buy 20Final Cut,  20 Motion and 20 Compresso

  • Getting control references which are in tabs

    Hello, In a labview vi, we can successfully get all the control references, including references to tab controls.  We would also like to get at the control references of controls which are contained within the tabs.  We've been hunting around the met