sirdan
sirdan

Reputation: 1028

Change colour and size to option box JOptionPane.showInputDialog

I have to change the background colour and the size of the option box from JOptionPane.showInputDialog. Is it possible? Is it something included in this list?

enter image description here

Upvotes: 1

Views: 265

Answers (1)

ControlAltDel
ControlAltDel

Reputation: 35011

The are two ways you could try.

The first is using the UIManager and seeing if you can set the background of the JOptionPane that way.

The second is to use JOptionPane with a custom component that is designed to look (and feel) the way you want it, like

Component mySpecialDialog = ... // your dialog panel
JOption.showMessageDialog(null, mySpecialDialog);

Upvotes: 2

Related Questions