Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jframe problem

 
adrei boadrei
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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.
Bad Aplication.jpg
[Thumbnail for Bad Aplication.jpg]
where jpanel appear
good apl.gif
[Thumbnail for good apl.gif]
where i want to appeared
 
Maneesh Godbole
Saloon Keeper
Posts: 11027
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic