• Post Reply Bookmark Topic Watch Topic
  • New Topic

Question about empty frame  RSS feed

 
Nick Lee
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use swing JFrame now,and want to activate another Frame after press the button on the original one, but my program ran very wield, that my new frame showed up but I can not see anything on it. But if I move the size of the frame, then everything on the frame showed up.

could any of you guys can figure out what's wrong with me Frame?

I used setVisible(true) and setSize(300, 300) in the end of frame launch mathod.
 
Mahesh x Bogadi
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This seems to be a layout problem.

*Which layout are you using?
*Please check what is the default JFrame Layout.
*before showing the frame call validate().
 
Nick Lee
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using grad Layout now

I don't know validate(), what's class method is this?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!