This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes jbutton in one line with jlabel Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "jbutton in one line with jlabel" Watch "jbutton in one line with jlabel" New topic
Author

jbutton in one line with jlabel

Lucas Smith
Ranch Hand

Joined: Apr 20, 2009
Posts: 804
    
    1

Hi,

I want to create the GUI which is similar to that from picture. Everything is OK, but I am not able to add that gaps (indicates by red colour).

NORTH, CENTER and EAST parts are OK.

I have the code for theSOUTH panel:



Everything is OK, but the gaps are absent. Any ideas on how to introduce them?


[Thumbnail for layout.JPG]



SCJP6, SCWCD5, OCE:EJBD6.
BLOG: http://leakfromjavaheap.blogspot.com
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4167
    
    3

Either use a more appropriate layout or an EmptyBorder.


luck, db
There are no new questions, but there may be new answers.
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 1790
    
    2
Read the GridLayout API for information on how to specify vertical/horizontal gaps.

Edit:

I was also going to suggest using a more appropriate layout, but Darryl beat me to it
Lucas Smith
Ranch Hand

Joined: Apr 20, 2009
Posts: 804
    
    1

Thank You both.

EmptyBorder is quite useful
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: jbutton in one line with jlabel
 
Similar Threads
GridBagLayout Problem
Opening a new window.
where is the frame and its components
Blank Frame or Panel
Symbol cannot be solved