JFrame.setDefaultLookAndFeelDecorated(true);
JDialog.setDefaultLookAndFeelDecorated(true);
try {
SubstanceImageWatermark watermark = new SubstanceImageWatermark(LoginFrame. class .getResourceAsStream( " /demo/001.jpg " ));
watermark.setKind(ImageWatermarkKind.SCREEN_CENTER_SCALE);
SubstanceSkin skin = new OfficeBlue2007Skin().withWatermark(watermark); //初始化有水印的皮肤
UIManager.setLookAndFeel( new SubstanceOfficeBlue2007LookAndFeel());
SubstanceLookAndFeel.setSkin(skin); //设置皮肤
} catch (UnsupportedLookAndFeelException ex) {
Logger.getLogger(LoginFrame. class .getName()).log(Level.SEVERE, null , ex);
}
我这样设置了,但没效果,什么原因? |
|