help_me
asked on
Clearing text and message prompts
How do you clear text from a textarea and from list box? Please give me the exact method.
Also how do you get a message prompt to display, which shows a message and allows you to click OK
Thanks
Mel
Also how do you get a message prompt to display, which shows a message and allows you to click OK
Thanks
Mel
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Please could you help further with the following:
Is there a method that will clear the text area completely, as I recall setText only
clears the first part of it.
For the message prompt I mean a small message box which will appear when the user clicks on a button. It will contain a message and an OK and Cancel button.
Thanks
Mel
Is there a method that will clear the text area completely, as I recall setText only
clears the first part of it.
For the message prompt I mean a small message box which will appear when the user clicks on a button. It will contain a message and an OK and Cancel button.
Thanks
Mel
ASKER
Please could you help further with the following:
Is there a method that will clear the text area completely, as I recall setText only
clears the first part of it.
For the message prompt I mean a small message box which will appear when the user clicks on a button. It will contain a message and an OK and Cancel button.
Thanks
Mel
Is there a method that will clear the text area completely, as I recall setText only
clears the first part of it.
For the message prompt I mean a small message box which will appear when the user clicks on a button. It will contain a message and an OK and Cancel button.
Thanks
Mel
Mel,
What do you mean by "first part of text area"?
As for the message box, AWT has nothing of the like, you would have to subclass Dialog and create your own notification box, which is not terribly difficult.
Swing, on the other hand, has exactly what you need in the class JOptionPane.
What do you mean by "first part of text area"?
As for the message box, AWT has nothing of the like, you would have to subclass Dialog and create your own notification box, which is not terribly difficult.
Swing, on the other hand, has exactly what you need in the class JOptionPane.
TextArea.setText("");