Re: JComboBox limit to list
From: ak (spam_at_imagero.com)
Date: 05/30/04
- Next message: Roedy Green: "Re: AWT ScrollPane"
- Previous message: ak: "Re: AWT ScrollPane"
- In reply to: Josef Garvi: "JComboBox limit to list"
- Next in thread: Josef Garvi: "Re: JComboBox limit to list"
- Reply: Josef Garvi: "Re: JComboBox limit to list"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 30 May 2004 02:27:17 +0200
> How can I make my editable Combo box limited to the items in the list
(like
> when using the LimitToList property in MS Access)?
> Not just making it highlight matching items in the list, but also refusing
> input that doesn't match the list entries?
what is "Combo box" ? I know only JComboBox and Choice.
if you use JComboBox:
1) get Document of ComboBoxEditor Component:
JTextField jtf = (JTextField)JComboBox#getEditor()#getEditorComponent();
Document doc = jtf.getDocument();
2) use this Document to refuse unmatched input.
-- http://uio.dev.java.net http://reader.imagero.com
- Next message: Roedy Green: "Re: AWT ScrollPane"
- Previous message: ak: "Re: AWT ScrollPane"
- In reply to: Josef Garvi: "JComboBox limit to list"
- Next in thread: Josef Garvi: "Re: JComboBox limit to list"
- Reply: Josef Garvi: "Re: JComboBox limit to list"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]