What is JTattoo?
JTattoo consists of several different Look and Feels for Swing applications. All of them enables developers to improve their application with an excellent user interface. So JTattoo opens desktop applications the door to end users who are unfortunate with the Look and Feels shipped with the standard JDK.
How to change the look of your application.
The following short code fragment shows you the way how to switch the Look and Feel in your application. Be sure that the JTattoo.jar is in the java classpath, if you want to run this demo. The easiest way is to copy the JTattoo.jar file into the (java_home)/jre/lib/ext folder.
首先在自己原有的程序里加载JTattoo包,右击自己的工程,选择最下面的Properties选项,蹦出如下对话框
选择JTattoo所在的路径并加入
package Demo;
//实例代码
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class JTattooDemo extends JFrame {
public JTattooDemo() {
super("Minimal-Frame-Application");
// setup menu
JMenuBar menuBar = new JMenuBar();
JMenu menu = new JMenu("File");
menu.setMnemonic('F');
JMenuItem menuItem = new JMenuItem("Exit");
menuItem.setMnemonic('x');
menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F4, KeyEvent.ALT_MASK));
menuItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
System.exit(0); } }); menu.add(menuItem); menuBar.add(menu); setJMenuBar(menuBar); // setup widgets
JPanel contentPanel = new JPanel(new BorderLayout());
contentPanel.setBorder(BorderFactory.createEmptyBorder(0, 4, 4, 4));
JScrollPane westPanel = new JScrollPane(new JTree());
JEditorPane editor = new JEditorPane("text/plain", "Hello World");
JScrollPane eastPanel = new JScrollPane(editor);
JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, westPanel,eastPanel);
splitPane.setDividerLocation(148);
contentPanel.add(splitPane, BorderLayout.CENTER);
setContentPane(contentPanel);
// add listeners
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
}
});
// show application
setLocation(32, 32);
setSize(400, 300);
show();
} // end CTor MinFrame
public static void main(String[] args) {
try {
// select Look and Feel
UIManager.setLookAndFeel("com.jtattoo.plaf.smart.SmartLookAndFeel");
// start application
new JTattooDemo();
}
catch (Exception ex) {
ex.printStackTrace();
}
} // end main
} // end class
附上可选皮肤参数
com.jtattoo.plaf.noire.NoireLookAndFeel 柔和黑
com.jtattoo.plaf.smart.SmartLookAndFeel 木质感+xp风格
com.jtattoo.plaf.mint.MintLookAndFeel 椭圆按钮+黄色按钮背景
com.jtattoo.plaf.mcwin.McWinLookAndFeel 椭圆按钮+绿色按钮背景
com.jtattoo.plaf.luna.LunaLookAndFeel 纯XP风格
com.jtattoo.plaf.hifi.HiFiLookAndFeel 黑色风格
com.jtattoo.plaf.fast.FastLookAndFeel 普通swing风格+蓝色边框
com.jtattoo.plaf.bernstein.BernsteinLookAndFeel 黄色风格
com.jtattoo.plaf.aluminium.AluminiumLookAndFeel 椭圆按钮+翠绿色按钮背景+金属质感
com.jtattoo.plaf.aero.AeroLookAndFeel xp清新风格
com.jtattoo.plafacryl.AcrylLookAndFeel 布质感+swing纯风格
- 大小: 67 KB
- 大小: 73.4 KB
分享到:
相关推荐
JTattoo项目 JTattoo是基于Swing的应用程序的外观库。 JTattoo由几种不同的外观组成,它们还可以通过出色的用户界面来改善Java应用程序。...JTattoo设置为使用构建 您需要JDK 6或更高版本才能构建和运行JTattoo。
有以下十种风格可以设置: javax.swing.UIManager.setLookAndFeel("com.jtattoo.plaf.smart.SmartLookAndFeel"); javax.swing.UIManager.setLookAndFeel("com.jtattoo.plaf.mcwin.McWinLookAndFeel"); ...
JTattoo.jar 美化swing 利用look and feel 美化Java的CS程序
a03LooKAndFeel皮肤,超炫超酷
使用lookandfeel为界面更换皮肤
java look and feel相当完整资料 通俗易懂
java Look and feel的一些例子,改变swing界面
超级漂亮的LookAndFeel超
swing 的各种look and feel.让你的java桌面程序有个性。 window风格,苹果风格,3d风格等等,
很好用的很漂亮的一个lookandfeel(nimrod),可自定义色彩,控件样式。 (内附使用方法)
java swing Mac风格的LookAndFeel包,含使用说明和效果图,适合用来美化界面
java swing 中通过UIManager.setLookAndFeel(new SubstanceBusinessBlackSteelLookAndFeel()); JFrame.setDefaultLookAndFeelDecorated(true); //设置主题 SubstanceLookAndFeel.setCurrentTheme(new ...
可以工作在中文环境下的jgoodies look and feel。jgoodies官方提供的包在中文环境下是没法运行的,都是乱码。我修改了源码,可以在中文环境下正常显示中文。
java look and feel 的例子,可以学学怎么给java gui 程序换皮肤
Java Look and Feel Design Guidelines. JAVA界面设计技术(换肤术)
Quaqua Look and Feel (Quaqua)是一款为Mac OS X编写的Apple人性化界面向导(AHIG)。报道中指出,新版本中增加了调色盘和粉笔面板,改进了色彩精度。此外还修补了一些bug。
LOOkAndFeel是你的JAVa界面更加绚丽多彩
Java Look and Feel Design Guidelines Advanced Topics provides advanced design guidelines for user interfaces based on the Java Foundation Classes (JFC) with the Java look and feel. This book augments ...
java中MVC与LookAndFeel类及自创界面(更新)
java swing Mac风格的look and feel包,美化程序界面,含有使用说明和效果图,不好意思,这个上传时选错了文件,哈哈,不要下载了,正确的文件查另一个我的上传