Results 1 to 3 of 3
Thread: JPanel - Refresh Problem
- 04-19-2011, 01:09 PM #1Member
- Join Date
- Apr 2011
- Rep Power
JPanel - Refresh Problem
I have a simple JFrame with inside a JPanel, with inside 2 others JPanels.
The top-inside panel displays an image, the bottom-inside panel has a JSlider. The user can use the JSlider to "animate" the image (for every movement of the JSlider a new frame is loaded and displayed).
This is the current situation:
The problem is that, as soon as the user moves the JSlider, the top JPanel start to have some drawing / refresh problems: the JSlider is painted also in the top panel (just painted, is not usable).
As soon as the user resize the JFrame everything is again displayed correctly.
What can I do to avoid this issue?
I tried with repaint(), revalidate(), removeAll() and then add(...) but I was not able to solve this.
Thank you for your help!
You've got a bug in your code. The solution is to try to find the bug and then fix it.
- By pratim in forum AWT / SwingReplies: 1Last Post: 03-13-2011, 07:28 PM
- By VineetKumar in forum AWT / SwingReplies: 1Last Post: 11-21-2008, 02:49 AM
- By alon2580 in forum AWT / SwingReplies: 3Last Post: 08-22-2008, 05:26 PM
- By nickbeacroft in forum AWT / SwingReplies: 8Last Post: 06-23-2008, 05:23 PM
- By olesja in forum AWT / SwingReplies: 1Last Post: 04-16-2008, 03:58 PM