All Downloads are FREE. Search and download functionalities are using the official Maven repository.

javajs.swing.JComboBox Maven / Gradle / Ivy

There is a newer version: 14.31.10
Show newest version
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 - 2024 Weber Informatics LLC | Privacy Policy