LAST question of the night....

i need the south and east buttons to change the x and y coordinates of the picture displayed respectively, i cant figure it out cus they are two different pictures! it needs to incremement the x and y axis to move it a little bit every time the user clicks the button import java.awt.*;
import java.applet.*;
import java.awt.event.*;
public class Lab6 extends Applet implements ActionListener, ItemListener {
  Panel northPanel, southPanel, eastPanel, westPanel;
  MyPanel centerPanel;
  boolean seen=true;
  Button northButton;
  Button southButton;
  Button eastButton;
  CheckboxGroup cbg;
  Checkbox radioButton;
       int fontSize;
  boolean flag = true;
  int mid;
  int top;
  int y = 0;
  Color myColor;
  Font f;
  public void init() {
    setBackground(Color.white);
    northPanel = new Panel();
    southPanel = new Panel();
    centerPanel = new MyPanel();
    eastPanel = new Panel ();
    westPanel = new Panel ();
    f = new Font("Arial", Font.BOLD, 12);
    myColor=new Color(123, 0, 255);
    setLayout(new BorderLayout(1, 1));
    add(northPanel, BorderLayout.NORTH);
    add(southPanel, BorderLayout.SOUTH);
    add(centerPanel, BorderLayout.CENTER);
    add(eastPanel, BorderLayout.EAST);
    add(westPanel, BorderLayout.WEST);
    northButton = new Button("Picture");
    southButton = new Button("X Position");
    eastButton = new Button ("Y Position");
    cbg = new CheckboxGroup();
    radioButton = new Checkbox("Color 1", cbg, false);
    northPanel.add(northButton);
    northButton.addActionListener(this);
    southPanel.add(southButton);
    southButton.addActionListener(this);
    eastPanel.add(eastButton);
    eastButton.addActionListener(this);
    westPanel.add(radioButton);
    radioButton.addItemListener(this);
  public void actionPerformed(ActionEvent e){
    if (e.getSource() == northButton){
      flag = !flag;
    centerPanel.repaint();
  public void itemStateChanged(ItemEvent e)
           if (e.getSource() == radioButton)
       setBackground(Color.red);
           fontSize=Integer.parseInt(cbg.getSelectedCheckbox().getLabel());
           repaint();
  class MyPanel extends Panel{
    private void drawBean (Graphics g, int mid, int top){
      g.setColor(Color.blue);
      g.fillOval(150, 80, 25, 60);
      g.fillOval(153, 140, 20, 100);
      g.fillOval(145, 75, 40, 10);
      g.fillOval(163, 70, 5, 5);
      g.setColor(Color.green);
      g.fillOval(83, 180, 10, 10);
      g.fillOval(219, 125, 10, 10);
    private void drawTraffic (Graphics g, int mid, int top){
      g.setColor(Color.black);
      g.drawRect (mid + 100, top - 100, 50, 150);
      g.setColor (Color.red);
      g.fillOval (mid + 100, top - 100, 50, 50);
      g.setColor (Color.yellow);
      g.fillOval (mid + 100, top - 50, 50, 50);
      g.setColor (Color.green);
      g.fillOval (mid + 100, top, 50, 50);
    public void paint(Graphics g){
      Dimension d = getSize();
      mid = d.width / 2;
      top = d.height / 3;
      if (flag == true){
        drawBean(g, mid, top);
      else{
        drawTraffic(g, mid, top);
}Message was edited by:
suomiatheart

Well, then I think you should ponder your situation for a few days. Maybe reread the flow of the program I posted in your other thread and comtemplate how you can use that to your advantage.
You don't seem to be able to write a single line of code on your own, and by posting 7 different threads you have managed to con people into writing your code for you.

Similar Messages

  • What is the last question at the end of auto-updates? "Allow" what? (I clicked on "Done" too fast.)

    Hi, I installed an auto-update today, lazily clicked on "Done" at the end without taking the time to read the last "pop-up" dialog box. I saw options about "allowing" something but I did not get a chance to read the question before it disappeared. What was that last question???

    replying to JS1111
    Now I only get one HKEYLOCALMACHINE\Software\
    QuicktimePlayerLib.QuicktimePlayerApp\CLSID.
    some folks have been having some success with pgfpdwife's technique in the following post:
    pgfpdwife: Re: Could not open key HKEYLOCALMACHINE\Software\Classic\Quicktime.Quicktime\
    note carefully that the technique involves a registry edit. be sure to make a backup of any keys you edit. if you're unfamiliar with your registry or registry editing, head to your XP help and support, do a search on registry, and read through the articles that come up.
    There are also some instructions on how to back up registry keys in the following document:
    Error 1406 or 1402 appears when you install iTunes or QuickTime for Windows

  • 1 last question. The underlying data type is .... ?

    interface MyInterface{}
    class MyInterfaceImpl implements MyInterface {}
    MyInterface myVar = new MyInterfaceImpl();in the last line is this correct.?
    myVar's underlying data type is MyInterfaceImpl and MyInterface is it's actual type?

    Anything would be correct.
    MyInterfaceImpl myvar = new MyInterfaceImpl();
    MyInterface myvar = new MyInterfaceImpl();
    The datatype and actual type is MyInterfaceImpl. But you cann access that object using the MyInterface interface.

  • Last question Regarding the Artwork

    I have saved various jpegs bitmaps and Gifs to my C: Drive pictures Folder to go along with each different podcasts. I just want to know here where can I put them in my F: Drive and how can or if I can automatically make them come up in the Artwork section of each different podcasts? These are titles I grabbed off the various websites that have podcasts I subscribed too. If it is possible where do I put them in the F: Drive under what folder? I do have a complete copy of iTunes in F: Drive, but don't know what to do with the artwork (pictures) I saved?
    I do have Windows and the main thing is can they be set up automatically be put up each time I download a new podcast from the various programs? How?
    I appreciate your patience in these questions. You can either reply here or email me directly at [email protected]
    Thank you.
    Message was edited by: viper48

    Just put the code inside of the video tag like this:
    <video width="960" height="540" poster="cover1.jpg" duration="10:53" preload="auto">
         <source type="video/webm" src="salamala-stereo-chinese.webmvp8.webm" />
         <source type="video/h264" src="salamala-stereo-chinese.mp4" />
         <source type="video/ogg" src="salamala-stereo-chinese.theora.ogv" />
         <embed src="video/salamala-stereo-chinese.flv" type="application/x-shockwave-flash" width="960" height="540" allowscriptaccess="always"></embed>
    </video>
    Nick

  • Last question of the day: java database?

    can you recommend a fairly reliable (mature) database which is made with java and does not require database connection strings, but can be interacted with by using SQL statements.

    Why do you want to avoid connection strings? What's
    the problem with them?
    Take a look at derby or hsqldb
    Kajtoo much effort, presumably. should go far

  • Last question for the day - Music Video

    Hi,
    I have been asked by a friend to do their music video for them. I understand while shooting they will be playing to the original recording but after a day of shooting and im back at my computer what is the best way to syc my clips to the master audio track? Is there a tutorial available on music video creating? I know I could sit there and bit by bit move the clip to match however I am hoping there is a tutorial on it some place on the net.
    Thanks

    Hi
    Me just thinking
    I would
    • Make several full song recordings with my Camera (close-ups, full size etc.)
    or use several Cameras (5 to 10 recordings)
    Put the best Audio-uptake as a master Audio then add video clips to do the visual
    part as rythmic and paced fast/slow enough to reflect the "Air" of the lyrics.
    Know what I'm taking about - NO Not at all - just speculating.
    (With several Cameras - all recording non-stop - this would be much easier in
    FinalCut Pro and the MultiCamera function.)
    Yours Bengt W

  • Dumb question of the night... but...

    I'm DESPERATE! I'm a Mac user, but am forced to use a PC here at work. I just downloaded the new version of Adobe Reader XI on my PC, and ever since, some critical programs won't run on my computer and I just keep getting some stupid welcome screen from Google. I've got to get this thing uninstalled from my computer and hope I can save face. Can anyone tell me how to do it (the uninstall of Reader XI from a Windows PC running Windows XP)? Pleeeeze???

    Did you by any chance install Google Chrome (by not unchecking the optional bundled software offer on the download page)?
    If so, uninstall Chrome: Start | Control Panel | Programs and Features | right-click on Google Chrome | select uninstall.
    If you also want to uninstall Adobe Reader, uninstall it the same way.
    P.S. some of the names in the above procedure may be different, depending on your Windows version.

  • One last question on the FCP 4.5 and 10.4.9 mess....

    Ok, I did the upgrade to 10.4.9 without checking here first too. Big oops! Couldn't capture either. Since then, I've done an erase and install and installed 10.4 back onto my system
    I've updated to 10.4.8, gotten all my programs installed, and everything is peachy.....
    .....except for quicktime 7. I cant install quicktime 7.1.6 unless I have 10.4.9. I've tried finding a 7.0 installer all over the internet and in these forums but the links I've found are all dead.
    Any help please! iTunes video won't work without quicktime 7. I need to see The Office!
    Power Mac dual 2.5 Ghz G5   Mac OS X (10.4.8)   2 gigs RAM, 2 250Gb internal hard drives,FCP 4.5, Motion 1, DVDSP 3

    Try here:
    http://discussions.apple.com/thread.jspa?messageID=4417365&#4417365
      Alberto

  • RoboDemo skipping last question

    Well, we still have a few RoboDemo files that we are still
    updating using RoboDemo. But, the OS on my computer was upgraded to
    XP and my copy of RoboDemo was removed. I have a couple of RoboDemo
    5 cds (different builds) but they are all having an issue with the
    questions, where it just skips the last question. The Display score
    at end of movie checkbox is checked. So, for instance if I have 20
    questions, after the 19th question, the question stats (# wrong, #
    correct) comes up. The build that I have installed right now is
    Version 5 Build 760.
    I would appreciate any RoboDemo expertise out there.
    Thanks.

    The last version of RoboDemo was/is Build #777.
    The change in OS shouldn't have anything to do with it, to
    the extent that WinXP is supported - though other changes made at
    the same time may be impacting the installation of RoboDemo. I
    doubt that is the problem, as it should either work - or not - when
    started, and your installation appears to be working.
    I'll bow out now, as I've already told you what the "fix" is
    (assuming that the correct build is installed). I've worked with RD
    from the beginning of time, so it will surprise me if someone has a
    different fix, but I certainly hope you do have luck in finding
    another solution ...
    ... best of luck.

  • I have 3 questions,Audio/Video Remote Control HID driver windows 8 fails to install code 32, trying to use usb tether connection rather then using WiFi to connect Laptop and iPhone. can only connect using wifi. Last quest. about the hotspot bar.

    In device manager it shows an error code 32' using iPhone 5 related to Apple Tv I believe is when this started, I am thinking I can DL the file and install
    biut I am not sure how to properly do this.
    Also I use my LTE to tether (paid) to my LapTop as well, The issue I am having, I cannot get the USB to work as a network connection. However using the WiFi method works fine but I rather use the sync cable at times such as when I am charging the phone and/or wishing to not  trainsmit my ssid for others to see even though I do use a password.
    Last question about using the built in WyFi tether connection, Is it posable to remove or ake the annoying blue indicater bar at the top disappear? This blocks from doing certain tasks that forces me to shut off the HotSpot app. to allow me to pull down the info bar at the top, Please Help Thanks

    In device manager it shows an error code 32' using iPhone 5 related to Apple Tv I believe is when this started, I am thinking I can DL the file and install
    biut I am not sure how to properly do this.
    Also I use my LTE to tether (paid) to my LapTop as well, The issue I am having, I cannot get the USB to work as a network connection. However using the WiFi method works fine but I rather use the sync cable at times such as when I am charging the phone and/or wishing to not  trainsmit my ssid for others to see even though I do use a password.
    Last question about using the built in WyFi tether connection, Is it posable to remove or ake the annoying blue indicater bar at the top disappear? This blocks from doing certain tasks that forces me to shut off the HotSpot app. to allow me to pull down the info bar at the top, Please Help Thanks

  • Please read my question carefully, this is, I think, a question for the experts. It's not the usual name change question.   When I setup my new MacBook Pro, something slipped by me and my computer was named First-Lasts-MacBook-Pro (using my real first and

    Please read my question carefully, this is, I think, a question for the experts. It's not the usual name change question.
    When I setup my new MacBook Pro, something slipped by me and my computer was named First-Lasts-MacBook-Pro (using my real first and last name).
    I changed the computer name in Preferences/Sharing to a new name and Preferences/Accounts to just be Mike. I can right click on my account name, choose advanced, and see that everything looks right.
    However, If I do a scan of my network with my iPhone using the free version of IP Scanner, it lists my computer as First-Lasts-MacBook-Pro! And it lists the user as First-Last.
    So even though another Mac just sees my new computer name, and my home folder is Mike, somewhere in the system the original setup with my full name is still stored. And it's available on a network scan. So my full name might show up at a coffee shop.
    Can I fully change the name without doing a complete re-install of Lion and all my apps?

    One thought... you said the iPhone displayed your computer's old name? I think that you must have used the iPhone with this computer before you changed the name. So no one else's iPhone should display your full name unless that iPhone had previously connected to your Mac. For example, I did this exact same change, and I use the Keynote Remote app to connect with my MacBook Pro. It would no longer link with my MacBook Pro under the old name, and I found that I had to unlink and then create a new link under the new name. So the answer to your question is, there is nothing you need to do on the Mac, but rather the phone, and no other phone will display your full name.

  • HT201272 The last 2 songs I purchased, Treasure and Take Back the Night, are not downloading from the cloud on either my iphone or ipad.  I have tried the previous suggestions.  Can you offer further advice.

    The last 2 songs I purchased, Treasure and Take Back the Night, are not downloading from the cloud on my iPhone 4 or my iPad2.  I have tried previous suggestions on the support page.  Can anyone suggest further solutions?

    Hello BwarsIG88
    Check your purchase history by going to the iTunes Store and then click on purchases. From there you can see all your purchase history and download what you are missing.
    Downloading past purchases from the iTunes Store, App Store, and iBooks Store
    http://support.apple.com/kb/ht2519
    Regards,
    -Norm G.

  • Reinstalling AE and PP due to an error with dynamic link. Where do i find the program install? And tips on how to reinstall without messing things up? last question is, does my recent files and saves work after the reinstall?

    I have allready bought the programs, but need to reinstall AE and PP due to an error with dynamic link.
    Where do i find the program install?
    And tips on how to reinstall without messing things up?
    last question is, does my recent files and saves work after the reinstall?
    Thank you

    karianne wrote:
    I have allready bought the programs, but need to reinstall AE and PP due to an error with dynamic link.
    Where do i find the program install?
    Which versions? Which operating system?
    Try Download and Installation Help

  • Okay, so please disregard my last question.  I had the page set up in vector view.  Hmmmm, ridiculous.

    okay, so please disregard my last question.  I had the page set up in vector view.  Hmmmm, ridiculous.  THanks, though, if you took the time to research my idiocy, I appreciate it.

    So this is not the computer that the device normally syncs with, iTunes is working exactly as designed.

  • Thanks for the idea. One last question..

    Thanks for the replies, setting it to passive seemed to work
    as I can now upload to my host. Just one last question, I've
    searched the video knowledge base looking for a video on how to use
    the 'Starter Pages' within Dreamweaver to no avail. When I try I
    always get the same message: 'Dreamweaver stores templates in the
    root folder of a site, but there are no sites defined. Please add a
    site.' I have my site all layed out in Dreamweavers FTP, I can
    upload and download with it and still Dreamweaver gives me this.
    Any ideas?
    Thanks once again all

    Using FTP & RDS Server for your site means that you will
    not be able to use
    DW's Templates or Library items. It's usually a very bad
    idea, to boot.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "John Waller" <[email protected]>
    wrote in message
    news:g1a9mi$qtn$[email protected]..
    > F1 Dreamweaver Help files
    >
    > Working with Dreamweaver Sites > Setting up a
    Dreamweaver site
    >
    > --
    > Regards
    >
    > John Waller

Maybe you are looking for

  • Redhat or suse linux installation on lenovo g560

    Hi, I have a linovo g560 with os window xp,now i want to install redhat linux,also tried to install suse linux on my laptop with cd.but after some screen and runnibg kernel the cd drive and hard drive detection gets failed.and the installation mode g

  • How to sort a PDF file by pre-printed numbers

    I have several PDF files, some hundreds of pages long. They are all "numbered" in the upper right hand corner. I believe there is some kind of stamp used to create this number. The number is in red, if it's relevant. I would like to be able to "split

  • WAIT(RECEIVE) issue in shared server

    I am reading cursor in a thread in C# side. When I stop the thread before fully reading the cursor, then the STATUS in v$shared_server shows WAIT(RECEIVE). If the cursor is fully read then v$shared_server does not contain WAIT(RECEIVE) status. So to

  • Mapviewer Admin - not starting when additional memory allocated o4cj start

    Forum: When startinng mapviewer 11g ( with java -jar -Xms128m -Xmx512m -XX:MaxPermSize=512m oc4j.jar, the mapviewer admin page does not initialize when we navigate to it in the browser. However , when we the simpler version, oc4j.cmd -start, the mapv

  • Excise Duty Scenario

    Good Morning all, Can anyone please explain the process of accounting excise invoice in business one.  I don't have any knowledge relates to excise process.  I can setup the tax codes and its combinations in business one.  I need help in which docume