--- a/lib/browser/awtUtilities/TextFrame.java Thu Apr 29 18:34:30 1999 +0200
+++ b/lib/browser/awtUtilities/TextFrame.java Thu Apr 29 22:42:38 1999 +0200
@@ -10,19 +10,20 @@
package awtUtilities;
import java.awt.*;
+import java.awt.event.*;
-public class TextFrame extends Frame {
- public boolean action(Event evt,Object obj) {
- if (evt.target instanceof Button)
- hide();
- return true;
+public class TextFrame extends Frame implements ActionListener {
+ public void actionPerformed(ActionEvent evt) {
+ setVisible(false);
}
public TextFrame(String title,String text) {
super(title);
- TextArea ta=new TextArea(text,200,80);
+ TextArea ta = new TextArea(text,200,80);
+ Button bt = new Button("Dismiss");
+ bt.addActionListener(this);
ta.setEditable(false);
- add("Center",ta);
- add("South",new Button("Dismiss"));
+ add("Center", ta);
+ add("South", bt);
}
}