import java.awt.*;
import java.awt.event.*;
import java.applet.*;
public class StatusExample extends Applet implements ActionListener
{
TextField statusField;
Button statusButton;
public void init()
{
setLayout(new FlowLayout());
statusButton = new Button("Set Status");
statusField = new TextField("Type here");
statusButton.addActionListener(this);
statusField.addActionListener(this);
add(statusButton);
add(statusField);
}
public void ActionPerformed(ActionEvent act)
{
if (act.getSource() == statusButton)
getAppletContext().showStatus(statusField.getText() +"(WithButtonAction)");
else
getAppletContext().showStatus(statusField.getText() + " (With FieldAction)");
}
}
I get this example from a website and i try use in netbean IDE but i notice an error states that "StatusExample is not abstract and does not override abstract method"...any idea?? there is no error in the source file name with the class name as well, maybe some silly syntax error again from me and i cant figure it out... :(
This post has been edited by stephen0606: 09 February 2010 - 07:52 PM

New Topic/Question
Reply




MultiQuote





|