質問

At school the JButton is themed like this:

School

At home the JButton is themed like this:

Home

Is it possible to switch the style to the second image? Not really that big of a deal, but I'd rather have it show up as the second one. Both computers use Windows 7, if I were to create a button from my home computer, it would look like the second one, but If I make it at school and switch it to my computer at home, it would look like the first

Why does it switch between the two?

役に立ちましたか?

解決

Take a look at How to Set the Look and Feel

The first is using the Metal look and feel and can be initialised using something like..

UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());

or

UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top