File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get this attached design using Layout Managers - sans GroupLayout

 
John Eipe
Ranch Hand
Posts: 215
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I would like to get the attached swing layout but I'm unable to. I was trying the below code.



Note: I don't want to use any GUI builders or GroupLayout. Please let me know if there is anyother way to get the desired output (see attached jpg file)using other Layouts. It need not be exactly the same as in the image but at least near to it.
Capture.JPG
[Thumbnail for Capture.JPG]
 
Rok Ć telcer
Ranch Hand
Posts: 101
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Javas layouts are very very powerful ... there is nothing you can't do.
Usually the BorderLayout will do its job.
However when starting to build some complex applications, you will have to use GridBagLayout.

I didn't check your code, so according to the picture you will need the following:
1. BorderLayout
http://java.sun.com/docs/books/tutorial/uiswing/layout/border.html
2. JSplitPane (perhaps)
http://java.sun.com/docs/books/tutorial/uiswing/components/splitpane.html
If there is no need for a splitted pane, then just skip this.
3. GridBagLayout + GridBagConstraints
http://java.sun.com/docs/books/tutorial/uiswing/layout/gridbag.html

Hope this helps.


Regards,
Rok
 
Rob Camick
Ranch Hand
Posts: 2473
8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You attempt only uses a single panel with a single layout manager. The trick is to use multiple panels with each panel using the apppriate layout manager.

I can't tell from the image what your exace goal is so I can't give further advice.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic