Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Flickering When Adding/Removing a Component to a JPanel With a Background

843805Sep 23 2005 — edited Sep 23 2005
Hello,
My problem is my applet is flickering when im adding/Removing Component to a JPanel the has a Image Background applied to it. For example let say I have a poker table image in the background and i add JButton's on each of the chairs so players can join the table. After everyone has joined i start to deal the cards. when I add a card the the JPanel is repaints the background then i have to repaint all the Join buttons again because the background of the JPanel painted over them (this also happens when removing a card from the screen). Is there a way i can double buffer the whole JPanel area (both the background image and compents), so when the background is repaints and all the component are repaint, then display the changed JPanel (Basicly repaint the new finished JPanel over the Old one). any help would be appericated.

--Z3r0CooL
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 21 2005
Added on Sep 23 2005
1 comment
37 views