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 ErrorReporterc - 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 ErrorReporterpublic void clearErrorMessage()
clearErrorMessage in interface ErrorReporterpublic void actionPerformed(ActionEvent evt)
actionPerformed in interface ActionListener