- searchBox.getEditor().getEditorComponent()
- .addKeyListener(new java.awt.event.KeyAdapter()
- {
- @Override
- public void keyPressed(KeyEvent e)
- {
- if (e.getKeyCode() == KeyEvent.VK_ENTER)
- {
- e.consume();
- searchStringAction();
- }
- }
- });
- searchBox.getEditor().getEditorComponent()
- .addFocusListener(new FocusAdapter()
+ searchBox.addKeyListener(new java.awt.event.KeyAdapter()
+ {
+ @Override
+ public void keyPressed(KeyEvent e)
+ {
+ if (e.getKeyCode() == KeyEvent.VK_ENTER)
+ {
+ e.consume();
+ searchStringAction();
+ }
+ }
+ });
+ searchBox.addFocusListener(new FocusAdapter()