Chapter 20 Java Utilities (Business web hosting) Package and Bit Manipulation

Chapter 20 Java Utilities Package and Bit Manipulation 1169 9 // Java extension packages 11 import javax.swing.*; 12 13 public class PropertiesTest extends JFrame { 14 private JLabel statusLabel; 15 private Properties table; 16 private JTextArea displayArea; 17 private JTextField valueField, nameField; 18 19 // set up GUI to test Properties table public PropertiesTest() 21 { 22 super( “Properties Test” ); 23 24 // create Properties table 25 table = new Properties(); 26 27 Container container = getContentPane(); 28 29 // set up NORTH of window’s BorderLayout JPanel northSubPanel = new JPanel(); 31 32 northSubPanel.add( new JLabel( “Property value” ) ); 33 valueField = new JTextField( 10 ); 34 northSubPanel.add( valueField ); 35 36 northSubPanel.add( new JLabel( “Property name (key)” ) ); 37 nameField = new JTextField( 10 ); 38 northSubPanel.add( nameField ); 39 JPanel northPanel = new JPanel(); 41 northPanel.setLayout( new BorderLayout() ); 42 northPanel.add( northSubPanel, BorderLayout.NORTH ); 43 44 statusLabel = new JLabel(); 45 northPanel.add( statusLabel, BorderLayout.SOUTH ); 46 47 container.add( northPanel, BorderLayout.NORTH ); 48 49 // set up CENTER of window’s BorderLayout displayArea = new JTextArea( 4, 35 ); 51 container.add( new JScrollPane( displayArea ), 52 BorderLayout.CENTER ); 53 54 // set up SOUTH of window’s BorderLayout 55 JPanel southPanel = new JPanel(); 56 southPanel.setLayout( new GridLayout( 1, 5 ) ); 57 58 // button to put a name/value pair in Properties table 59 JButton putButton = new JButton( “Put” ); Fig. 20.4 Demonstrating class Properties(part 2 of 6).
Note: In case you are looking for affordable and reliable webhost to host and run your business application check Vision php5 hosting services

Leave a Reply