aspose file tools
The moose likes Swing / AWT / SWT and the fly likes How to make a botton smaller? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "How to make a botton smaller?" Watch "How to make a botton smaller?" New topic
Author

How to make a botton smaller?

Ren Shao
Ranch Hand

Joined: Dec 23, 2002
Posts: 51
I the GridLayout, I add several buttons into the pane, the size of all the buttons are same: the same size as the grid. How can I make one button smaller than others? or How can I make components smaller than the size of a grid in GridLayout?
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

GridLayout makes all components added to it the same size. What you would have to do is add the button to a panel with a different layout (i.e. FlowLayout) and then add that panel to the container with the GridLayout. The panel will take up the entire "grid segment", but the button will just be default size inside the panel.


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: How to make a botton smaller?
 
Similar Threads
Using GridLayout
How to add two buttons in each row?
same old gridbag
buttons that are not same size
Swings