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

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?

[546 byte] By [quereinsteigera] at [2007-11-27 5:12:19]
# 1
You really can't that way. Of course you can create a new JOptionPane (constructor) and use JOptionPane.createDialog() to make the dialog. Then name that.
bsampieria at 2007-7-12 10:33:08 > top of Java-index,Desktop,Core GUI APIs...