Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Setting name for JDialog when using JOptionPane.showMessageDialog(...)

843806May 23 2007 — edited May 23 2007
We use a GUI testing tool which requires that the GUI component names are set to constant values.

When a message dialog is called with this code below, the name is set to dialog12, dialog13 and so on. But I need to set the name of the JDialog which appears when calling this method:
JOptionPane.showMessageDialog(parent, messageArea, title, messageType);
There is no return value. So how to set the name?

Is there another easy convenience method for showing a message dialog, but beeing able to set the name for it?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 20 2007
Added on May 23 2007
1 comment
130 views