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