1170 Java Utilities Package and (Abyss web server) Bit Manipulation Chapter

1170 Java Utilities Package and Bit Manipulation Chapter 20 61 putButton.addActionListener( 62 63 new ActionListener() { 64 65 // put name/value pair in Properties table 66 public void actionPerformed( ActionEvent event ) 67 { 68 Object value = table.setProperty( 69 nameField.getText(), valueField.getText() ); 70 71 if ( value == null ) 72 showstatus( “Put: ” + nameField.getText() + 73 ” ” + valueField.getText() ); 74 75 else 76 showstatus( “Put: ” + nameField.getText() + 77 ” ” + valueField.getText() + 78 “; Replaced: ” + value.toString() ); 79 80 listProperties(); 81 } 82 } 83 ); // end call to addActionListener 84 85 southPanel.add( putButton ); 86 87 // button to empty contents of Properties table 88 JButton clearButton = new JButton( “Clear” ); 89 90 clearButton.addActionListener( 91 92 new ActionListener() { 93 94 // use method clear to empty table 95 public void actionPerformed( ActionEvent event ) 96 { 97 table.clear(); 98 showstatus( “Table in memory cleared” ); 99 listProperties(); 100 } 101 } 102 ); // end call to addActionListener 103 104 southPanel.add( clearButton ); 105 106 // button to get value of a property 107 JButton getPropertyButton = new JButton( “Get property” ); 108 109 getPropertyButton.addActionListener( 110 111 new ActionListener() { 112 Fig. 20.4 Demonstrating class Properties(part 3 of 6).
Note: If you are looking for cheap and reliable webhost to host and run your mysql application check Vision professional web hosting services

Leave a Reply