
javajs.swing.JComboBox Maven / Gradle / Ivy
package javajs.swing;
import javajs.util.SB;
public class JComboBox extends AbstractButton {
private String[] info;
private int selectedIndex;
public JComboBox(String[] info){
super("cmbJCB");
this.info = info;
}
public void setSelectedIndex(int i) {
selectedIndex = i;
/**
* @j2sNative
*
* SwingController.setSelectedIndex(this);
*
*/
{
}
}
public int getSelectedIndex() {
return selectedIndex;
}
public Object getSelectedItem() {
return (selectedIndex < 0 ? null : info[selectedIndex]);
}
@Override
public String toHTML() {
SB sb = new SB();
sb.append("\n\n");
return sb.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy