Problems displaying and array of JPanels
Hello! I'm having a bit of a problem displaying an array of JPanels I've made in my program. The basic idea of it is to read in an arbitrary integral value from a text file and make a corresponding number of JPanels (each with its own components of course). I've taken the liberty of simplifying it, making the "arbitrary integral value" equal to three...since I don't want to bombard you with useless code and since I already know how to read in the data.
The problem is that I'm only getting one JPanel with one JLabel message; id est, the "What is wrong with this program?!" I'm fairly new to Java-based GUI (and to Java itself), but shouldn't I have three panels and, consequently, three JLabel messages?
public class Paneler
private JFrame theWindow;
private PanelType  thePanels;
private Container thePane;
public static void main(String  arguments)
int numPanels = 3;
thePanels = new PanelType[numPanels];
theWindow = new JFrame("UGH");
thePane = theWindow.getContentPane();
for (int i = 0; i < numPanels; i++) //is this loop correct?
thePanels[i] = new PanelType();
private class PanelType extends JPanel
private JLabel message;
message = new JLabel("What is wrong with this program?!");
Thanks in advance!
(Bah! I spelled "an" incorrectly!)