Bei mir kommt eine Fehlermeldung dass JComboBox(String[]) undefiniert ist. Was muss ich jetzt machen?
public class JComboBox extends JFrame { String[] anrede = {"", "Herr", "Frau"}; JComboBox cbox = new JComboBox(anrede); <----FEHLERZEILE ! JTextField field = new JTextField(20); JButton button = new JButton("Absenden"); JLabel label = new JLabel(); public JComboBox()
}
techniker1fg04 5 months ago
@techniker1fg04 Hey, ja du erstellst ja die Klasse JComboBox neu und überschreibst sie damit ;)
Das solltest du nicht tun. gib deiner klasse einfach nen anderen Namen, z.B JComboBoxProgramm
F4bisTutorials 5 months ago
@F4bisTutorials Hey, klingt logisch. Jetzt klappt es, danke :)
@techniker1fg04 Kein Problem, viel Spaß weiterhin :)
Bei mir kommt eine Fehlermeldung dass JComboBox(String[]) undefiniert ist. Was muss ich jetzt machen?
public class JComboBox extends JFrame { String[] anrede = {"", "Herr", "Frau"}; JComboBox cbox = new JComboBox(anrede); <----FEHLERZEILE ! JTextField field = new JTextField(20); JButton button = new JButton("Absenden"); JLabel label = new JLabel(); public JComboBox()
}
techniker1fg04 5 months ago
@techniker1fg04 Hey, ja du erstellst ja die Klasse JComboBox neu und überschreibst sie damit ;)
Das solltest du nicht tun. gib deiner klasse einfach nen anderen Namen, z.B JComboBoxProgramm
F4bisTutorials 5 months ago
@F4bisTutorials Hey, klingt logisch. Jetzt klappt es, danke :)
techniker1fg04 5 months ago
@techniker1fg04 Kein Problem, viel Spaß weiterhin :)
F4bisTutorials 5 months ago