Interestingly enough, the bug database does list this problem.  Not only 
that, it also claims that the problem was fixed in 1.3. But there are a lot 
of people who say otherwise.

At 08:19 AM 1/15/2002, [EMAIL PROTECTED] wrote:
>Actually, I just realized that this may not work, because
>showInputDialog uses a JDialog for display, and the docs for JDialog's
>main constructor state:
>
>   NOTE: Any popup components (JComboBox, JPopupMenu, JMenuBar) created
>   within a modal dialog will be forced to be lightweight.

Sorry, I should've RTFM'ed

>I've tried to determine where the creation of JComboBox comes in the
>execution of JOptionPane.showInputDialog, and the whole thing is
>mysterious.  [...] Does anybody know how it
>is that a JComboBox comes to be used by showInputDialog?

The combo box is created by a UI class 
(javax.swing.plaf.basic.BasicOptionPaneUI) in the most inflexible manner 
one could possibly think of.  Basically, whatever genius implemented the 
class (I swear, at times I think that the bulk of the core classes were 
written by summer interns) didn't provide a factory method for component 
creation, so there is no way to override this behavior.

The only other idea I have is to override JOptionPane itself and muddle 
with setBounds.

Dmitry

_______________________________________________
Swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/swing

Reply via email to