I am near to completing my application which has been somewhat challenging, it is due friday. I have all of my Labels etc nicely within Frames. my only problem is that only 1 of my Checkboxes are displaying instead of the 8 that should.
For what it's worth this is the parralel array and Checkbox init code
//parralel Array
final String TURBINE_NAME []
= {"Judoon 3X", "Gallifrey 3000", "Veridian AX25",
"Kasterborous M4", "Axxon 300","Dradis CF9", "Kenobi 0B1", "J-Dorian"};
CheckboxGroup Wind_Turbine_CheckboxGroup
= new CheckboxGroup ();
Checkbox Wind_Turbine_Checkbox []
= new Checkbox [TURBINE_NAME.length];
Checkbox Hidden_Checkbox
= new Checkbox ("", true, Wind_Turbine_CheckboxGroup);
for (int i = 0; i < TURBINE_NAME.length; i++)
{
Wind_Turbine_Checkbox [i] = new Checkbox (TURBINE_NAME [i], false, Wind_Turbine_CheckboxGroup);
Wind_Turbine_Checkbox [i].addItemListener(this);
Panel CheckboxPanel = new Panel (new GridLayout (4, 2, 1, 1));
CheckboxPanel.add (Wind_Turbine_Checkbox [i]);
Panel ApplicationPanel = new Panel (new GridLayout (4, 1, 10, 1));
ApplicationPanel.add (TurbineLayoutPanel);
ApplicationPanel.add (CheckboxPanel);
ApplicationPanel.add (choice_panel);
ApplicationPanel.add (DisplayPanel);
add (ApplicationPanel);
}
This does everything I need except it only displays one of the Checkboxes. I tried referencing the
Wind_Turbine_Checkbox outside the loop, but it just errors and says it cannot find the variable. I am seriously out of ideas.
If anyone can see whats going on here that would be greatly appreciated.