/Users/lyon/j4p/src/gui/keyboard/KeyTestFrame.java

1    package gui.keyboard; 
2     
3    import gui.touchtone.TouchToneButtonPad; 
4    import gui.touchtone.TouchToneModel; 
5    import gui.run.RunButton; 
6     
7    import javax.swing.*; 
8    import java.awt.*; 
9     
10   // gui.keyboard.KeyTest 
11    
12   public class KeyTestFrame extends gui.ClosableJFrame { 
13    
14       public static void main(String args[]) { 
15           KeyTestFrame ktf = new KeyTestFrame(); 
16           final TouchToneModel ttm = 
17                   new TouchToneModel(); 
18           JPanel jp = new JPanel(); 
19           TouchToneButtonPad tt = 
20                   new TouchToneButtonPad(jp, ttm); 
21           Container c = ktf.getContentPane(); 
22           c.setLayout(new BorderLayout()); 
23           c.add(jp,BorderLayout.CENTER); 
24           c.add(ttm.getTextField(), BorderLayout.NORTH); 
25           c.add(new RunButton("[Enter"){ 
26                public void run() { 
27                    System.out.println(ttm.getStateString()); 
28                } 
29           },BorderLayout.EAST); 
30           ktf.setSize(300, 300); 
31           ktf.setVisible(true); 
32    
33       } 
34   }