- this.setBorder(new TitledBorder(MessageManager
- .getString("label.search_filter")));
-
- JvSwingUtils.jvInitComponent(searchBox);
- searchBox.setToolTipText(MessageManager
- .getString("info.enter_search_text_here"));
- searchBox.getDocument().addDocumentListener(new DocumentListener()
- {
- @Override
- public void insertUpdate(DocumentEvent e)
- {
- searchStringAction();
- }
-
- @Override
- public void removeUpdate(DocumentEvent e)
- {
- searchStringAction();
- }
-
- @Override
- public void changedUpdate(DocumentEvent e)
- {
- searchStringAction();
- }
- });
+ this.setBorder(new TitledBorder(
+ MessageManager.getString("label.search_filter")));
+
+ searchBox.setPrototypeDisplayValue("XXXXXXXXXXXXXXXXXXXXXXX");
+ searchBox.setToolTipText(
+ MessageManager.getString("info.enter_search_text_here"));
+ searchBox.getEditor().getEditorComponent()
+ .addKeyListener(new java.awt.event.KeyAdapter()
+ {
+ @Override
+ public void keyPressed(KeyEvent e)
+ {
+ if (e.getKeyCode() == KeyEvent.VK_ENTER)
+ {
+ e.consume();
+ searchStringAction();
+ }
+ }
+ });