문제

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