• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

repaint the frame

 
arona kosari
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot.That was my problem.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic