Splatt
October 4th, 2000, 01:29 PM
Is there any reason you can't use a JLabel more than once in the same JPanel? I can't seem to. For example:
JLabel testLabel = new JLabel("T");
testLabel.setForeground(Color.black);
testLabel.setFont(stdFont);
this.add(testLabel);
//I add a JTextField here
this.add(testLabel);
//I add a JTextField here
this.add(testLabel);
doesn't work. Only the last added JLabel will appear. Does anyone know a way around this?
"There's nothing more dangerous than a resourceful idiot." ---Dilbert
JLabel testLabel = new JLabel("T");
testLabel.setForeground(Color.black);
testLabel.setFont(stdFont);
this.add(testLabel);
//I add a JTextField here
this.add(testLabel);
//I add a JTextField here
this.add(testLabel);
doesn't work. Only the last added JLabel will appear. Does anyone know a way around this?
"There's nothing more dangerous than a resourceful idiot." ---Dilbert