Package: javax.swing.* |
Product: Swing |
Release: 1.0.3 |
Related Links: |
ComboBox
JDialog
JFileChooser
JFrame
JOptionPane
JProgressBar
JScrollPane
JTable
General
JTree
JWindow
KeyStroke
LayeredPane
UIDefaults
|
Comment: |
class AbstractComboBoxModel extends AbstractListModel implements ComboBoxModel { private Object selectedObject = null; public void setSelectedItem(Object item) { selectedObject = item; dbg("" + selectedObject); fireContentsChanged(this, -1, -1); } public Object getSelectedItem() { return selectedObject; } public Object getElementAt(int i) { if (getResultatenLijst() != null && i <= getSize()) { return getResultatenLijst().elementAt(i); } return null; } public int getSize() { if (getResultatenLijst() != null) { return getResultatenLijst().size(); } return 0; } } |