Flickering When Adding/Removing a Component to a JPanel With a Background
843805Sep 23 2005 — edited Sep 23 2005Hello,
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