User not logged in - login - register
Home Calendar Books School Tool Photo Gallery Message Boards Users Statistics Advertise Site Info
go to bottom | |
 Message Boards » » Java GUI question Page [1]  
Novicane
All American
15413 Posts
user info
edit post

without using absolute postioning, I am trying to place two buttons on the bottom of my JPanel (control panel) that is set on the right side.



I have a panel of radio buttons inside of the control panel.

at the bottom of my control panel I want two buttons. When I add the button panel to the control panel

 (using p.add(buttonPanel, BorderLayout.SOUTH); // P is ControlPanel) 
it only places them just below my radio button panel. Maybe a couple of pixel below and not at the bottom.

I tried adding in a temp panel for CENTER but it didn't work.

[Edited on January 30, 2006 at 6:18 AM. Reason : ff]

1/30/2006 6:17:18 AM

Shaggy
All American
17820 Posts
user info
edit post

try

p.setLayout(new BorderLayout());

prior to adding the interior panels.

1/30/2006 6:00:07 PM

zorthage
1+1=5
17148 Posts
user info
edit post

use GridBagLayout http://java.sun.com/j2se/1.5.0/docs/api/java/awt/GridBagLayout.html

It lets you put things in a grid, so you can place the items more intuitively.

1/31/2006 12:08:56 AM

 Message Boards » Tech Talk » Java GUI question Page [1]  
go to top | |
Admin Options : move topic | lock topic

© 2024 by The Wolf Web - All Rights Reserved.
The material located at this site is not endorsed, sponsored or provided by or on behalf of North Carolina State University.
Powered by CrazyWeb v2.38 - our disclaimer.