DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2006

    Unhappy Jpanel and repaint() problem


    I am trying to code a simple alarm clock, and I'm having problems with the repaint() method.

    The applet has been setup using a JPanel, and as the seconds pass by, I want the digital clock to update this. In the run() method I call for the repaint() hoping that it will clear the screen and update it with the new time.

    What actually happens is the new time updates itself and paints on the old time

    can someone pls help me with this. I've written the same code without using a Jpanel, but using normal frames and it works.

    anyone got any ideas??

  2. #2
    Join Date
    Mar 2004
    So the new time is being painted on top of the old time, so they're overlaying? You have to clear the area yourself first. You'll probably get some flickering though, so look into double buffering.

  3. #3
    Join Date
    Apr 2006

    Hi audette,

    I'l try working on your problem. Plz visit the forum again. Maybe i can fix it..

Similar Threads

  1. GUI Problem - Fan Blades DO NOT move
    By Flipsidebabee in forum Java
    Replies: 0
    Last Post: 04-07-2006, 07:12 PM
  2. repaint()???
    By burung in forum Java
    Replies: 3
    Last Post: 08-04-2005, 12:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.