Java LookAndFeel之Substance的设置

public static void main(String[] args)
	{
		// 装载可选择的主题
		try {
			//设置外观
			UIManager.setLookAndFeel(new SubstanceBusinessBlackSteelLookAndFeel());
			JFrame.setDefaultLookAndFeelDecorated(true);
			//设置主题 
			SubstanceLookAndFeel.setCurrentTheme(new SubstanceEbonyTheme());
			//设置按钮外观
			SubstanceLookAndFeel.setCurrentButtonShaper(new ClassicButtonShaper());
			//设置水印
			SubstanceLookAndFeel.setCurrentWatermark(new SubstanceBinaryWatermark());
			//设置边框
			SubstanceLookAndFeel.setCurrentBorderPainter(new StandardBorderPainter());
			//设置渐变渲染
			SubstanceLookAndFeel.setCurrentGradientPainter(new StandardGradientPainter());
			//设置标题
			SubstanceLookAndFeel.setCurrentTitlePainter(new FlatTitlePainter());
		} catch (Exception e) {
			System.out.println(e.getMessage());
		}
	}

效果示例:

Java LookAndFeel之Substance的设置

你可能感兴趣的:(java,ITeye)