Hi,
I am a newbie to GUI programming and I was hoping someone could help
me.
I have a JFrame app that does not repaint when I log out (and then in)
of my Windows machine until I minimize and restore the GUI. Is there a
way of forcing the GUI to repaint when I log in again or have some sort
of background process that repaints at particular intervals? Please let
me know. Thanks!
Zaineb
Camford - 25 Aug 2005 06:54 GMT
doesn't JFrame (or JPanel) has a repaint() method or something? It should
also have a paintComponent() method.
I've only just started GUI programming recently. Currently having trouble
with a piece of university work. I have no idea how the two methods work, at
least that's a starting point. Hope this helped, if it's only a little bit.
Good luck
Thomas Weidenfeller - 25 Aug 2005 07:38 GMT
> doesn't JFrame (or JPanel) has a repaint() method or something? It should
> also have a paintComponent() method.
Which are not intended for fixing a broken layout. You never have to
call them by yourself for normal windows.
> I've only just started GUI programming recently. Currently having trouble
> with a piece of university work. I have no idea how the two methods work,
So why do you recommend them? See
http://java.sun.com/products/jfc/tsc/articles/painting/index.html
/Thomas

Signature
The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
http://www.uni-giessen.de/faq/archiv/computer-lang.java.gui.faq/
Thomas Weidenfeller - 25 Aug 2005 07:36 GMT
> I have a JFrame app that does not repaint when I log out (and then in)
> of my Windows machine until I minimize and restore the GUI. Is there a
> way of forcing the GUI to repaint when I log in again or have some sort
> of background process that repaints at particular intervals?
Please check Q3.1, Q3.2, Q3.3, Q3.4, Q4.2, Q4.3, Q5.13, Q8.2, and Q8.10
of the comp.lang.java.gui FAQ. And Q2.4 and Q2.6 for an extra bonus.
/Thomas

Signature
The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
http://www.uni-giessen.de/faq/archiv/computer-lang.java.gui.faq/
zaineb@gmail.com - 25 Aug 2005 21:24 GMT