aspose file tools
The moose likes Swing / AWT / SWT and the fly likes Question about empty frame Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "Question about empty frame" Watch "Question about empty frame" New topic
Author

Question about empty frame

Nick Lee
Ranch Hand

Joined: Dec 17, 2002
Posts: 45
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.


Nick Lee
Mahesh x Bogadi
Ranch Hand

Joined: Jul 06, 2004
Posts: 51
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

Joined: Dec 17, 2002
Posts: 45
I'm using grad Layout now

I don't know validate(), what's class method is this?
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Question about empty frame
 
Similar Threads
Showmodal in Java
Problem with writing and reading using RandomAccessFile
put an applet into a web page
create a JDialog that is modal?
Displaying images in a JESS GUI