/Users/lyon/j4p/src/ip/gui/frames/InfoFrame.java

1    package ip.gui.frames; 
2     
3    import ip.graphics.Globals; 
4     
5    import java.awt.*; 
6    import java.awt.event.ActionListener; 
7     
8    public class InfoFrame extends ClosableFrame { 
9        private TextArea 
10               ta = new TextArea( 
11                       "Enter Commands, separated by spaces, below\n" + 
12               "for example:\n negate fishEye\n", 10, 60, 
13                       TextArea.SCROLLBARS_BOTH); 
14       private TextField 
15               tf = new TextField(); 
16    
17       public InfoFrame(ActionListener cli) { 
18           super(Globals.title + ":InfoFrame"); 
19           ta.setEditable(false); 
20           add(ta, BorderLayout.CENTER); 
21           add(tf, BorderLayout.SOUTH); 
22           tf.addActionListener(cli); 
23           setVisible(true); 
24           pack(); 
25       } 
26    
27       public void print(Object s) { 
28           ta.append(s.toString()); 
29       } 
30    
31       public void println() { 
32           ta.append("\n"); 
33       } 
34    
35       public void println(Object s) { 
36           ta.append(s.toString() + "\n"); 
37       } 
38    
39   }