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 jframe problem 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 "jframe problem" Watch "jframe problem" New topic
Author

jframe problem

adrei boadrei
Greenhorn

Joined: Nov 24, 2012
Posts: 5


I created an application in Jframe . This application contains several Jpanel with different sizes.
Then I created another application that extends Jpanel.
how I can to add the JPanel in the JFram class but to appear in my desired location with the desired size.



[Thumbnail for Bad Aplication.jpg]


[Thumbnail for good apl.gif]

Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10268
    
    8

Welcome to the Ranch.

Check out BorderLayout.
It will let you add child components to North, South, East, West and Center.

You can also nest layouts. e.g. Container X having Layout x has a child container Y having layout y.
More on using layout managers here http://docs.oracle.com/javase/tutorial/uiswing/layout/visual.html


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
 
Consider Paul's rocket mass heater.
 
subject: jframe problem