ComboBox definieren

Status
Nicht offen für weitere Antworten.

dabidu

Aktives Mitglied
private variable;

Code:
 variable = new JComboBox(Object[] items);

wie definiert man ein combobox

bitte helfen
 
Was genau meinst du? Willst du denn Inhalt, also die Auswahlmöglichkieten festlegen?

Code:
,
JComboBox myCombo = new JComboBox();
myCombo.addItem("Inhalt 1");
myCombo.addItem("Inhalt 2");

//usw...

aber sowas findest du auch eigentlich alles in den FAQs!
 
nächste Frage

variable.addLayout(new FlowLayout(FlowLayout(5,10,5,10));

ich weiss zwar, dass man mit
.addLayout(new FlowLayout(FlowLayout.LEFT);
.addLayout(new FlowLayout(FlowLayout.CENTER);
.addLayout(new FlowLayout(FlowLayout.RIGHT);

richtigen kann

aber wie kann ich den einzelne Objekte sprich Label oder Buttons voneinander getrennt richten

bye
 
Status
Nicht offen für weitere Antworten.

Zurück
Oben