This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Also, depending on what you are trying to accomplish with a KeyListener on a JComboBox you might not be adding the listener to the appropriate element.
chen young
Ranch Hand
Joined: Sep 09, 2005
Posts: 177
posted
0
The idea is to enable the button when I type any key in the JComboBox
angus young wrote:The idea is to enable the button when I type any key in the JComboBox
Then you probably need to assign the key listener to the editor of the JComboBox. In edit mode, a JComboBox uses a text field and that is the element you need to add the listener to since it is what gains focus.
chen young
Ranch Hand
Joined: Sep 09, 2005
Posts: 177
posted
0
like this : findBox.getEditor().addActionListener(this); ?
chen young
Ranch Hand
Joined: Sep 09, 2005
Posts: 177
posted
0
like this : findBox.getEditor().addActionListener(this); ?
chen young
Ranch Hand
Joined: Sep 09, 2005
Posts: 177
posted
0
like this : findBox.getEditor().addActionListener(this); ?