AZ_
AZ_

Reputation: 21899

customize Java dialog Color, Appearance, Theme

I want to make Java JDialog appear like it is presented in the image (link below) using JDK 6 Swing. Is it possible? if so kindly guide me. Image Link: Image

Upvotes: 2

Views: 1865

Answers (2)

Venkat
Venkat

Reputation: 21490

Yes, It is possible. You can add your component is,

  myDialog.getContentPane().add(someComponent);

and the color is,

   myDialog.getContentPane().setBackground( Color."YourColor");

and select the theme, and set into to your main program like,

   nimbus, motif,windows,etc

Then the selected look and feel will be chang your theme.

Upvotes: 2

Thirler
Thirler

Reputation: 20760

In java swing this is called the 'look and feel'. You can change the look and feel as follows:

UIManager.setLookAndFeel(
        UIManager.getCrossPlatformLookAndFeelClassName());

Sun has a large Look and feel tutorial that explains how this works.

I'm not sure which look and feel you are linking to though, you'd have to find that out.

Upvotes: 1

Related Questions