Posted: Thu Jun 12, 2008 1:17 pm Post subject: New Panel not showing up
This is probably me missing something simple, but I can't seem to get my choice boxes to appear on screen (note that if you click where they should be, they do appear, one at a time)
code:
public void writeQuizFromFile (String name) throws IOException
{
BufferedReader input = new BufferedReader (new FileReader (name));
String[] question = new String [5];
JRadioButton[] [] choice = new JRadioButton [4] [5];
ButtonGroup group[] = new ButtonGroup [5];
JPanel quizPanel = new JPanel (new GridLayout (10, 10));
String temp;
for (int j = 0 ; j < 5 ; j++)
{
question [j] = input.readLine ();
group [j] = new ButtonGroup ();
for (int k = 0 ; k < 4 ; k++)
{
temp = input.readLine ();
choice [k] [j] = new JRadioButton (temp);
choice [k] [j].setActionCommand (temp);