aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes repaint the frame Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "repaint the frame" Watch "repaint the frame" New topic
Author

repaint the frame

arona kosari
Greenhorn

Joined: Oct 28, 2006
Posts: 19
Hi.
I use frame and panel in my program,but when i run it,i must at first resize the frame too see it's panel.
I use repaint method too,but anything will change.
I'm wainting for your guidence.
Thanking you in anticipation.
Arona
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
generally indicates you have setVisible(true) in the wrong spot

frame.setVisible(true);
frame.add(panel);

should be

frame.add(panel);
frame.setVisible(true);
arona kosari
Greenhorn

Joined: Oct 28, 2006
Posts: 19
Thanks a lot.That was my problem.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: repaint the frame
 
Similar Threads
can i use 2 panel in 1 frame?
Size of JScrollPane in a JPanel
repaint problem in JPanel
repaint() will not always repaint()
HFJ TwoButtons problems