Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Layout Problem  RSS feed

 
Brad Murphy
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I was just wondering if someone could give me a little layout advise. I'm trying to create a window that is divided into a top and bottom area. The top area would be around 70% of the screen, and the bottom would be 30%. I have tried a borderlayout, however the bottom (south) always seems too small. Is there a way to make the bottom bigger? Also, I would like the 70-30 ratio to be dynamic when the user is resizing the window.
Also, is there a way I can have the application start maximized, or a specific size?
This is my first post, so thank you to all that answer.
 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Brad,
Do you know about the "javax.swing.JSplitPane" class? May be what you are looking for.
Since JDK 1.4 you can use "full screen" mode. There is a lesson about it in the "Java Tutorial"
http://java.sun.com/docs/books/tutorial/extra/fullscreen/index.html
Hope this helps.
Good Luck,
Avi.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, is there a way I can have the application start maximized, or a specific size?
Take a quick look at The Frame Class Documentation. You should notice a method called setSize(int,int) and a method called setExtendedState(int).
Good luck and I hope to see you 'round the Ranch!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!