G
Guest
Gast
Warum wird mein JPanel nicht gezeigt?
Das wird in:
aufgerufen.
Code:
private JPanel loadpaneltest() {
getContentPane().setLayout(new BorderLayout());
JPanel panelload = new JPanel();
panelload.setLayout(new BorderLayout());
loadButton = new JCheckBox("load");
panelload.add(loadButton);
panelload.setBackground(Color.yellow);
getContentPane().add(panelload);
getContentPane().add(loadButton);
repaint();
loadButton.addItemListener(listener_load);
return panelload;
}
Das wird in:
Code:
public void init() {
if (a==0) {
loadpaneltest();
}
}