Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
for (int count = 0; count = 26; count ++)
         {
              letter[count] += Alpha.charAt(count);
              arrBtnAlpha[count] = new JButton(letter[count]);
              pan1.add(arrBtnAlpha[count]);
         }


I want to add 26 buttons with letters of the alphabet but I want the first and second rows to have 9 letters and the remaining one letter to be on the 3rd row. I have already tried pan1.setLayout(new GridLayout(9, 4)); and it just fills the whole screen while I want to divide the container in to 3: panel 1, panel 2 and panel 3.
Posted
Updated 31-Aug-10 21:28pm
v2
Comments
LittleYellowBird 1-Sep-10 3:40am    
Hi, I have changed your title from all capitals as it looks like shouting / demanding attention and annoys people. Also, I have tidied up the English as a better phrased question will attract more useful answers. :)
allaparaclatus 1-Sep-10 3:48am    
Thank you Alison.

1 solution

Take a look at the sample here[^], it should help to resolve your problem.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900