public class MessagePopup extends Object implements ActionListener, ErrorReporter
Constructor and Description |
---|
MessagePopup(Component source)
Create a MessagePopup with the give source component.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent evt)
Respond when user clicks OK.
|
void |
clearErrorMessage()
Clear the error message and close the window.
|
String |
getErrorMessage()
Get the currently displayed error message.
|
void |
setErrorMessage(Controller c,
String message)
Show the given message in a dialog box or independent window,
depending on whether the source component is contained in
a Frame or not.
|
public MessagePopup(Component source)
public void setErrorMessage(Controller c, String message)
setErrorMessage
in interface ErrorReporter
c
- The Controller that calls this method, or null if it is not called by a Controller.
(The Controller, if any, will be notified when the error message is cleared.)message
- The message to display.public String getErrorMessage()
getErrorMessage
in interface ErrorReporter
public void clearErrorMessage()
clearErrorMessage
in interface ErrorReporter
public void actionPerformed(ActionEvent evt)
actionPerformed
in interface ActionListener