Main Page | Class Hierarchy | Class List | File List | Class Members | Related Pages

MessagePanel.java

00001 /* 00002 * Created on Feb 22, 2004 00003 * 00004 */ 00005 package org.nees.rbnb; 00006 00007 import java.applet.Applet; 00008 import java.awt.*; 00009 import java.awt.event.ActionEvent; 00010 import java.awt.event.ActionListener; 00011 00016 public class MessagePanel 00017 extends Panel 00018 implements ActionListener 00019 { 00020 00021 TextArea textArea = null; 00022 00023 MessagePanel() 00024 { 00025 setLayout(new BorderLayout()); 00026 Button b = new Button("Clear"); 00027 b.addActionListener(this); 00028 add("South",b); 00029 00030 textArea = new TextArea("", 10, 40); 00031 add("Center",textArea); 00032 validate(); 00033 repaint(); 00034 } 00035 00036 public void message(String text) 00037 { 00038 textArea.append(text + "\n"); 00039 } 00040 00041 public void actionPerformed(ActionEvent arg0) { 00042 clear(); 00043 } 00044 00045 private void clear() 00046 { 00047 textArea.setText(""); 00048 } 00049 }

Generated on Tue Aug 24 11:12:26 2004 for Data turbine for NEESGrid by doxygen 1.3.7