Ejemplo n.º 1
0
 public void actionPerformed(ActionEvent e) {
   // This if statement prevents the the program from searching the records when no parameters
   // had been entered( because that would be pointless)
   if (((searchTextfield[0].getText().equalsIgnoreCase("enter Search Parameter"))
           || (searchTextfield[0].getText().equalsIgnoreCase("")))
       && ((searchTextfield[1].getText().equalsIgnoreCase("enter Search Parameter"))
           || (searchTextfield[1].getText().equalsIgnoreCase("")))
       && ((searchTextfield[2].getText().equalsIgnoreCase("enter Search Parameter"))
           || (searchTextfield[2].getText().equalsIgnoreCase("")))
       && ((searchTextfield[3].getText().equalsIgnoreCase("enter Search Parameter"))
           || (searchTextfield[3].getText().equalsIgnoreCase("")))
       && ((searchTextfield[4].getText().equalsIgnoreCase("enter Search Parameter"))
           || (searchTextfield[4].getText().equalsIgnoreCase("")))
       && ((searchTextfield[5].getText().equalsIgnoreCase("enter Search Parameter"))
           || (searchTextfield[5].getText().equalsIgnoreCase("")))
       && ((searchTextfield[6].getText().equalsIgnoreCase("enter Search Parameter"))
           || (searchTextfield[6].getText().equalsIgnoreCase("")))) {
   }
   // If a search parameters has been entered, then the records will be searched, reloaded back
   // to the GUI, and the buttons will be disabled.
   // The buttons are disabled because it is one of the limitations of the program
   else {
     Classes.search();
     Classes.makeSearchArrayIndexesLookNicer();
     reloadArrayValuesToGUI();
     Classes.EnableSortButtons(false);
   }
 }
Ejemplo n.º 2
0
 public void actionPerformed(ActionEvent e) {
   // The searchTextfields will be reset
   for (int i = 0; i < 7; i++) {
     searchTextfield[i].setText("enter Search Parameter");
   }
   // arrayIndexes will be reset
   Classes.resetArrayIndexes();
   reloadArrayValuesToGUI();
   // the sorting buttons will be enabled again
   Classes.EnableSortButtons(true);
 }