Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

jframe problem  RSS feed

 
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
Bartender
Posts: 11445
18
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!