这个是我用java SWT开发工具,窗口界面用的是shell控件,可是太不好看了
怎么才能将窗口美化一下做到像第二张图片这样呢,现在QQ什么的聊天工具都是这种风格,是怎么做到的?
------解决方案--------------------
可以设置LookAndFeel,通过第三方皮肤:
可选使用substance、JTattoo、liquidlnf等,我当前使用的是JTattoo的皮肤,swing/awt的默认皮肤确实是有点那个...LZ可以去G一下上述皮肤,你会发现你的界面会很NICE的.
如下代码是我使用JTattoo的SmartLookAndFeel主题皮肤的方法,GoodLuck!
- Java code
public static void main(String[] args) { JFrame.setDefaultLookAndFeelDecorated(true); JDialog.setDefaultLookAndFeelDecorated(true); try { SmartLookAndFeel.setTheme("Green"); SmartLookAndFeel lookFeel = new SmartLookAndFeel(); javax.swing.UIManager.setLookAndFeel(lookFeel); } catch (Exception e) { e.printStackTrace(); } java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new ToolMainFrame().setVisible(true); } }); }