Estou tentando adionar valores em uma jCombox mas não esta funcionando. Alguem pode me ajudar?
Estou usando Netbeans e componente Swing.
private void openSistema(){
String sistemas[] = {“Administrador”, “Almoxarifado”, “Clinico”, “Financeiro”};
jComboBox1 = new JComboBox( sistemas );
jComboBox1.setMaximumRowCount(4);
jComboBox1.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent event) {
if(event.getStateChange() == ItemEvent.SELECTED)
if(ItemEvent.SELECTED == "Administrador")
new TelaAdministrador().setVisible(true);
}
});