File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "jframe problem" Watch "jframe problem" New topic

jframe problem

adrei boadrei

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: 10824

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

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
I agree. Here's the link:
subject: jframe problem
jQuery in Action, 3rd edition