Buggy code:
public class GrabKeyDialog extends JDialog { public static String toString ( KeyEvent evt ) { } public GrabKeyDialog ( Dialog parent , GrabKeyDialog . KeyBinding binding , Vector allBindings , Buffer debugBuffer ) { } public GrabKeyDialog ( Frame parent , GrabKeyDialog . KeyBinding binding , Vector allBindings , Buffer debugBuffer ) { } public String getShortcut ( ) { } public boolean isOK ( ) { } public boolean isManagingFocus ( ) { } public boolean getFocusTraversalKeysEnabled ( ) { } protected void processKeyEvent ( KeyEvent evt ) { } private GrabKeyDialog . InputPane shortcut ; private JLabel assignedTo ; private JButton ok ; private JButton remove ; private JButton cancel ; private JButton clear ; private boolean isOK ; private GrabKeyDialog . KeyBinding binding ; private Vector allBindings ; private Buffer debugBuffer ; private void init ( GrabKeyDialog . KeyBinding binding , Vector allBindings , Buffer debugBuffer ) { this . binding = binding ; this . allBindings = allBindings ; this . debugBuffer = debugBuffer ; enableEvents ( AWTEvent . KEY_EVENT_MASK ) ; JPanel content = new JPanel ( new GridLayout ( 0 , 1 , 0 , 6 ) ) { public boolean isManagingFocus ( ) { return false ; } public boolean getFocusTraversalKeysEnabled ( ) { return false ; } } ; content . setBorder ( new EmptyBorder ( 12 , 12 , 12 , 12 ) ) ; setContentPane ( content ) ; JLabel label = new JLabel ( ( debugBuffer == null ? jEdit . getProperty ( "grab-key.caption" , new String [ ] { binding . label } ) : jEdit . getProperty ( "grab-key.keyboard-test" ) ) ) ; Box input = Box . createHorizontalBox ( ) ; shortcut = new GrabKeyDialog . InputPane ( ) ; input . add ( shortcut ) ; input . add ( Box . createHorizontalStrut ( 12 ) ) ; clear = new JButton ( jEdit . getProperty ( "grab-key.clear" ) ) ; clear . addActionListener ( new GrabKeyDialog . ActionHandler ( ) ) ; input . add ( clear ) ; assignedTo = new JLabel ( ) ; if ( debugBuffer == null ) updateAssignedTo ( null ) ; Box buttons = Box . createHorizontalBox ( ) ; buttons . add ( Box . createGlue ( ) ) ; if ( debugBuffer == null ) { ok = new JButton ( jEdit . getProperty ( "common.ok" ) ) ; ok . addActionListener ( new GrabKeyDialog . ActionHandler ( ) ) ; buttons . add ( ok ) ; buttons . add ( Box . createHorizontalStrut ( 12 ) ) ; if ( binding . isAssigned ( ) ) { remove = new JButton ( jEdit . getProperty ( "grab-key.remove" ) ) ; remove . addActionListener ( new GrabKeyDialog . ActionHandler ( ) ) ; buttons . add ( remove ) ; buttons . add ( Box . createHorizontalStrut ( 12 ) ) ; } } cancel = new JButton ( jEdit . getProperty ( "common.cancel" ) ) ; cancel . addActionListener ( new GrabKeyDialog . ActionHandler ( ) ) ; buttons . add ( cancel ) ; buttons . add ( Box . createGlue ( ) ) ; content . add ( label ) ; content . add ( input ) ; if ( debugBuffer == null ) content . add ( assignedTo ) ; content . add ( buttons ) ; setDefaultCloseOperation ( WindowConstants . DISPOSE_ON_CLOSE ) ; pack ( ) ; setLocationRelativeTo ( getParent ( ) ) ; setResizable ( false ) ; <START_BUG> show ( ) ; <END_BUG> } private String getSymbolicName ( int keyCode ) { } private void updateAssignedTo ( String shortcut ) { } private GrabKeyDialog . KeyBinding getKeyBinding ( String shortcut ) { } public static class KeyBinding { public KeyBinding ( String name , String label , String shortcut , boolean isPrefix ) { } public String name ; public String label ; public String shortcut ; public boolean isPrefix ; public boolean isAssigned ( ) { } } class InputPane extends JTextField { public boolean getFocusTraversalKeysEnabled ( ) { } protected void processKeyEvent ( KeyEvent _evt ) { } } class ActionHandler implements ActionListener { public void actionPerformed ( ActionEvent evt ) { } private boolean canClose ( ) { } } }

Fix:
setVisible ( true ) ;