> I want to have a dialog with additional display of details which only open
> on request. To achieve this I could
[quoted text clipped - 3 lines]
> * extend JOptionPane. But then I would have to extend BasicOptionPaneUI as
> well, which will of course breaking the usage of 3d party plafs ....
Carsten,
all you need is to pass appropriate components to
JOptionPane#showOptionDialog(
Component parentComponent,
Object message, String title, int optionType,
int messageType, Icon icon,
Object[] options, Object initialValue)
Javadoc says:
"options - an array of objects indicating the possible choices the user can
make;
if the objects are components, they are rendered properly;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
non-String objects are rendered using their toString methods;
if this parameter is null, the options are determined by the Look and Feel."

Signature
Andrey Kuznetsov
http://uio.dev.java.net Unified I/O for Java
http://reader.imagero.com Java image reader
http://jgui.imagero.com Java GUI components and utilities
Carsten Zerbst - 14 Jan 2005 13:23 GMT
Am Fri, 14 Jan 2005 00:38:10 +0100 schrieb Andrey Kuznetsov:
> all you need is to pass appropriate components to
> JOptionPane#showOptionDialog(
>
This approach does not work. At least it's looking disgusting.
The documentation of BasicOptionPaneUI says about the layout
------------------
| i | message |
| c | message |
| o | message |
| n | message |
------------------
| buttons |
|________________|
Which gives this with just a customized component as message
-------------------------
| i | message |
| c | message |
| o | message |
| n | |
| | Show Detail [X] |
| | Additional Details|
| | |
-------------------------
| buttons |
|_______________________|
Whereas I want to have something like this
-------------------------
| i | message |
| c | message |
| o | message |
| n | message |
-------------------------
| Show Details [X] |
| Optional Detail View |
| |
-------------------------
| buttons |
|_______________________|
So one need a new line in the layout which is not possible with
BasicOptionPaneUI
Bye, Carsten