Results 1 to 2 of 2
- 03-13-2011, 11:40 AM #1Member
- Join Date
- Mar 2011
- Rep Power
how to refresh the contents of a JPanel
hello, i am new to JAVA SWING and i don't know all its features very well. I need to refresh the contents of a JPanel, which is in a JFrame. I have succesfully used card layout. i have several JPanels in a JFrame.
Now what i need to do is to refresh the contents of only one JPanel. Again at the same time i have a question whether i need to refresh all the JPanels seperately, if i have to do refresh of all the JPanels? My JPanels have different contents in different JPanels. Plz, help me in this regard. i don't understand what to do. I have heard about repaint(), revalidate(), updateUI(). but i don't know the difference that when to use them...?
i have to refresh my JPanel in a regular interval of 1 hour, whether i have to use timers? Plz, help me in am rather confused.
Thanks in advance. Any small help from u will highly be appreciated.
- 03-13-2011, 07:28 PM #2
- By johnvarg in forum AWT / SwingReplies: 1Last Post: 02-23-2010, 10:48 AM
- 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