From: tcofoegbu Date: Mon, 29 May 2017 12:05:05 +0000 (+0100) Subject: JAL-1648 code fix - enter key should pick selected item on finder searchbox X-Git-Tag: Release_2_10_2~3^2~45^2~1 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=51d6ad94bf0acf8c9d49dc2821e6b2067c711575;p=jalview.git JAL-1648 code fix - enter key should pick selected item on finder searchbox --- diff --git a/src/jalview/jbgui/GFinder.java b/src/jalview/jbgui/GFinder.java index bbd20ca..00b4fdc 100755 --- a/src/jalview/jbgui/GFinder.java +++ b/src/jalview/jbgui/GFinder.java @@ -33,7 +33,6 @@ import java.awt.Font; import java.awt.GridLayout; import java.awt.Insets; import java.awt.event.ActionEvent; -import java.awt.event.KeyEvent; import javax.swing.JButton; import javax.swing.JCheckBox; @@ -143,15 +142,6 @@ public class GFinder extends JPanel textfield_caretUpdate(e); } }); - searchBox.getEditor().getEditorComponent() - .addKeyListener(new java.awt.event.KeyAdapter() - { - @Override - public void keyPressed(KeyEvent e) - { - textfield_keyPressed(e); - } - }); mainBorderLayout.setHgap(5); mainBorderLayout.setVgap(5); @@ -194,14 +184,6 @@ public class GFinder extends JPanel { } - protected void textfield_keyPressed(KeyEvent e) - { - if (e.getKeyCode() == KeyEvent.VK_ENTER) - { - e.consume(); - findNext_actionPerformed(null); - } - } public void createFeatures_actionPerformed() {