Buggy code:
public class InstancesTab extends JPanel implements Tab { private static final long serialVersionUID = - 969812552965390610L ; private JPanel topPanel ; private JButton clearButton ; private JTextField searchBox ; private JButton searchButton ; private JCheckBox hasUpdate ; private JLabel hasUpdateLabel ; private String searchText = null ; private boolean isUpdate = false ; private JPanel panel ; private JScrollPane scrollPane ; private int currentPosition = 0 ; public InstancesTab ( ) { } public void loadContent ( boolean keepFilters ) { topPanel = new JPanel ( ) ; topPanel . setLayout ( new FlowLayout ( FlowLayout . LEFT ) ) ; clearButton = new JButton ( INSTANCE . localize ( "common.clear" ) ) ; clearButton . addActionListener ( new ActionListener ( ) { public void actionPerformed ( ActionEvent e ) { searchBox . setText ( "" ) ; hasUpdate . setSelected ( false ) ; reload ( ) ; } } ) ; topPanel . add ( clearButton ) ; searchBox = new JTextField ( 16 ) ; if ( keepFilters ) { searchBox . setText ( this . searchText ) ; } searchBox . addKeyListener ( new KeyAdapter ( ) { <START_BUG> public void keyPressed ( KeyEvent e ) { <END_BUG> if ( ( e . getKeyChar ( ) ) == ( KeyEvent . VK_ENTER ) ) { reload ( ) ; } } } ) ; topPanel . add ( searchBox ) ; searchButton = new JButton ( INSTANCE . localize ( "common.search" ) ) ; searchButton . addActionListener ( new ActionListener ( ) { public void actionPerformed ( ActionEvent e ) { reload ( ) ; } } ) ; topPanel . add ( searchButton ) ; hasUpdate = new JCheckBox ( ) ; hasUpdate . setSelected ( isUpdate ) ; hasUpdate . addActionListener ( new ActionListener ( ) { public void actionPerformed ( ActionEvent e ) { reload ( ) ; } } ) ; topPanel . add ( hasUpdate ) ; hasUpdateLabel = new JLabel ( INSTANCE . localize ( "instance.hasupdate" ) ) ; topPanel . add ( hasUpdateLabel ) ; add ( topPanel , BorderLayout . NORTH ) ; panel = new JPanel ( ) ; scrollPane = new JScrollPane ( panel , JScrollPane . VERTICAL_SCROLLBAR_AS_NEEDED , JScrollPane . HORIZONTAL_SCROLLBAR_NEVER ) ; scrollPane . getVerticalScrollBar ( ) . setUnitIncrement ( 16 ) ; add ( scrollPane , BorderLayout . CENTER ) ; panel . setLayout ( new GridBagLayout ( ) ) ; GridBagConstraints gbc = new GridBagConstraints ( ) ; gbc . gridx = gbc . gridy = 0 ; gbc . weightx = 1.0 ; gbc . fill = GridBagConstraints . BOTH ; int count = 0 ; for ( Instance instance : settings . getInstancesSorted ( ) ) { if ( instance . canPlay ( ) ) { if ( keepFilters ) { boolean showInstance = true ; if ( ( searchText ) != null ) { if ( ! ( Pattern . compile ( Pattern . quote ( searchText ) , Pattern . CASE_INSENSITIVE ) . matcher ( instance . getName ( ) ) . find ( ) ) ) { showInstance = false ; } } if ( isUpdate ) { if ( ! ( instance . hasUpdate ( ) ) ) { showInstance = false ; } } if ( showInstance ) { panel . add ( new com . atlauncher . gui . card . InstanceCard ( instance ) , gbc ) ; ( gbc . gridy ) ++ ; count ++ ; } } else { panel . add ( new com . atlauncher . gui . card . InstanceCard ( instance ) , gbc ) ; ( gbc . gridy ) ++ ; count ++ ; } } } if ( count == 0 ) { panel . add ( new com . atlauncher . gui . card . NilCard ( INSTANCE . localizeWithReplace ( "instance.nodisplay" , "\n\n" ) ) , gbc ) ; } SwingUtilities . invokeLater ( new Runnable ( ) { public void run ( ) { scrollPane . getVerticalScrollBar ( ) . setValue ( currentPosition ) ; } } ) ; } public void reload ( ) { } @ Override public String getTitle ( ) { } No newline ; at end ; of file ; }

Fix:
public void keyReleased ( KeyEvent e ) {