Changeset 15732

Show
Ignore:
Timestamp:
27.05.2008 18:03:44 (11 years ago)
Author:
ak19
Message:

Made the searchButton of the QueryForm? be the default button so that it would respond to Enter being pressed in text fields

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • other-projects/trunk/gs3-webservices-democlient/src/GS3DemoClient/org/greenstone/gs3client/QueryForm.java

    r15222 r15732  
    5656    implements ActionListener, KeyListener, ColourCombo.ColourChangeable  
    5757{ 
    58     /** Handle to the running instance of the GS3JavaClient in order to have 
     58    /** Handle to the running instance of the GS3JavaClient in order to have 
    5959     * access to its methods */ 
    6060    protected GS3JavaClient client; 
     
    245245        this.add(searchButton, BorderLayout.SOUTH); 
    246246        searchButton.setText(submit); 
     247 
     248        // Setting the search button as the default button so that it may respond 
     249        // to Enter presses in textfields. 
     250        // See http://java.sun.com/docs/books/tutorial/uiswing/components/button.html 
     251        this.getRootPane().setDefaultButton(searchButton); 
     252         
    247253        this.validate();  
    248254    }