| 3599 |      1 | /***************************************************************************
 | 
|  |      2 |   Title:      Graph/TextFrame.java
 | 
|  |      3 |   Author:     Stefan Berghofer, TU Muenchen
 | 
|  |      4 | 
 | 
|  |      5 |   This class defines a simple text viewer.
 | 
|  |      6 | ***************************************************************************/
 | 
|  |      7 | 
 | 
|  |      8 | package awtUtilities;
 | 
|  |      9 | 
 | 
|  |     10 | import java.awt.*;
 | 
| 6541 |     11 | import java.awt.event.*;
 | 
| 3599 |     12 | 
 | 
| 6541 |     13 | public class TextFrame extends Frame implements ActionListener {
 | 
|  |     14 | 	public void actionPerformed(ActionEvent evt) {
 | 
|  |     15 | 		setVisible(false);
 | 
| 3599 |     16 | 	}
 | 
|  |     17 | 
 | 
|  |     18 | 	public TextFrame(String title,String text) {
 | 
|  |     19 | 		super(title);
 | 
| 6541 |     20 | 		TextArea ta = new TextArea(text,200,80);
 | 
|  |     21 | 		Button bt = new Button("Dismiss");
 | 
|  |     22 | 		bt.addActionListener(this);
 | 
| 3599 |     23 | 		ta.setEditable(false);
 | 
| 6541 |     24 | 		add("Center", ta);
 | 
|  |     25 | 		add("South", bt);
 | 
| 3599 |     26 | 	}
 | 
|  |     27 | }
 |