---
title: "Ubuntu安装Intellij idea后的界面美化操作"
author: "cduym"
date: "2013-07-10T23:18:09Z"
tags: []
categories: ["开源软件"]
slug: "ubuntu-intellij-idea"
draft: false
lastmod: "2013-07-11T02:00:23Z"
id: 1902851
url: "https://cduym.iteye.com/blog/1902851"
---

换个IDE来玩玩，发现Idea安装后界面很丑，中文变口口，英文字体发虚有锯齿，相比而言eclipse界面做的算是非常好了，原因在于eclipse用的swt，idea用的是swing，那也就没有什么好抱怨的了，swing做的像这样的gui软件已经很不错了。

 

接下来就是优化下界面了，否则在这种环境下编程，有害身心。

 

设置代码区的字体 写道

File-Settings-Editor-Colors & Fonts-Font

选择DejaVe Sans Mono（En）和文泉驿等宽正黑（中文），字体可以设置大点，18比较合适

 

IDE菜单的字体 写道

File-Settings-Appearance

Theme选择经典的“Darcula”黑色主题，默认字体选择“WenQuanYi Micro Hei”，大小选择16，解决了中文乱码的问题。

 

在~/.profile加入启动参数，用于抗锯齿等效果

export \_JAVA\_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel'

 

Java中的几种Look and Feel

1、Metal风格 (默认)  
String lookAndFeel = "javax.swing.plaf.metal.MetalLookAndFeel";  
UIManager.setLookAndFeel(lookAndFeel);  
2、Windows风格  
String lookAndFeel = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";  
UIManager.setLookAndFeel(lookAndFeel);  
3、Windows Classic风格  
String lookAndFeel = "com.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel";  
UIManager.setLookAndFeel(lookAndFeel);  
4、Motif风格  
String lookAndFeel = "com.sun.java.swing.plaf.motif.MotifLookAndFeel";  
UIManager.setLookAndFeel(lookAndFeel);  
5、Mac风格 (需要在相关的操作系统上方可实现)  
String lookAndFeel = "com.sun.java.swing.plaf.mac.MacLookAndFeel";  
UIManager.setLookAndFeel(lookAndFeel);  
6、GTK风格 (需要在相关的操作系统上方可实现)  
String lookAndFeel = "com.sun.java.swing.plaf.gtk.GTKLookAndFeel";  
UIManager.setLookAndFeel(lookAndFeel);  
7、可跨平台的默认风格  
String lookAndFeel = UIManager.getCrossPlatformLookAndFeelClassName();  
UIManager.setLookAndFeel(lookAndFeel);  
8、当前系统的风格  
String lookAndFeel = UIManager.getSystemLookAndFeelClassName();  
UIManager.setLookAndFeel(lookAndFeel);

 

 [http://smartgeek.iteye.com/blog/1744507](http://smartgeek.iteye.com/blog/1744507)