| Author |
[solved]GridLayout problem
|
L Willie
Ranch Hand
Joined: Aug 10, 2008
Posts: 51
|
|
how to group JRadioButton in a 'box' i want the looks in following arrangement [alias |jtf_alias ] [keyalg |jrb_DSA + jrb_RSA] [keysize |jtf_keysize ] [keystore |jtf_keystore ] [validity |jtf_validity ] [ October 12, 2008: Message edited by: L Willie ]
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32830
|
|
GridLayout is usually easy to use, only the Components all seem to come out the same size. For 5 rows, 2 columns, Add a label then a button, that's the 1st row. Add a label then a button, that's the 2nd row. Add a label then a button, that's the 3rd row, etc. Whenever I have used GridLayout I didn't bother with Constraints or anything. Just the GridLayout.
|
 |
L Willie
Ranch Hand
Joined: Aug 10, 2008
Posts: 51
|
|
please try to run my program,then you'll understand my problem. i thought a solution,that is use blank JLabel to fill up 3rd column for each rows and cheat GridLayout,but i think this is not a standard method.
|
 |
pete stein
Bartender
Joined: Feb 23, 2007
Posts: 1561
|
|
put the radiobuttons into their own jpanel, then add that jpanel into the main jpanel like so:
|
 |
L Willie
Ranch Hand
Joined: Aug 10, 2008
Posts: 51
|
|
thank a lot to pete stein. thank to JavaRanch because of help me solve lot of java problem that i face so far.
|
 |
 |
|
|
subject: [solved]GridLayout problem
|
|
|