This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Swing / AWT / SWT and the fly likes Sub JPanel Size Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Sub JPanel Size" Watch "Sub JPanel Size" New topic
Author

Sub JPanel Size

Behrouz Hosseini
Ranch Hand

Joined: Feb 15, 2010
Posts: 31
Hi Every one,
I am trying to add some panels to my main Jpanel . I have three simple class as below. Every thing works fine except that I can not set the sub JPanels(pan1,pan2,pan3) size!
1-Class MyPanel
2-Class MyFrame
3-Class Main
I tried the setPreferredSize() method as well, but it did not work! Could you please let me know what I am doing wrong!?


Best Regards
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> I tried the setPreferredSize() method as well, but it did not work!

worked OK for me
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Sub JPanel Size