Hallo!
Ich möchte gerne ein Label für eine Auswahlbox setzen. Leider funktioniert das nicht so ganz
Kann mir vll. jemand sagen woran das liegt?
Die Auswahlbox wird Angezeigt. nur das Label dafür nicht .... ???:L
Ich möchte gerne ein Label für eine Auswahlbox setzen. Leider funktioniert das nicht so ganz
Kann mir vll. jemand sagen woran das liegt?
Code:
private static String containerString = "Container: ";
...
.....
.JPanel choicePane = new JPanel();
choicePane.setLayout(new BoxLayout(choicePane, BoxLayout.LINE_AXIS));
JLabel containerLabel = new JLabel(containerString);
containerLabel.setLabelFor(containers);
choicePane.add(containers);
choicePane.setBorder(BorderFactory.createEmptyBorder(0,10,10,100));
.......
..
add(choicePane, BorderLayout.NORTH);