substance look&feel 사용예
import javax.swing.*;
import java.awt.*;
import org.jvnet.substance.SubstanceLookAndFeel; //substance look&feel사용
import org.jvnet.substance.theme.*; // theme사용
public class Walkthrough extends JFrame{
public Walkthrough() {
super("Sample app");
final JComboBox combo1 = new JComboBox(new Object[] { "entry1",
"entry2", "entry3", "entry4", "entry5", "entry6" });
combo1.setToolTipText("This is my combo 1"); //툴팁 설정
combo1.setMaximumRowCount(4); // 보여질 row갯수 설정
combo1.setEditable(true);
add(combo1);
setLayout(new FlowLayout());
add(new JButton("button"));
add(new JCheckBox("check"));
add(new JLabel("label"));
this.pack();
this.setSize(this.getPreferredSize());
this.setLocationRelativeTo(null);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}// 생성자
public static void main(String[] args) {
try {
// 사용할 테마 설정
SubstanceLookAndFeel.setCurrentTheme(new SubstanceAquaTheme());
// look&fell설정
UIManager.setLookAndFeel(new SubstanceLookAndFeel());
} catch (UnsupportedLookAndFeelException ulafe) {
System.out.println("Substance failed to set");
}//catch
//이분분이 윈도우 프레임 변경
JFrame.setDefaultLookAndFeelDecorated(true);
Walkthrough w = new Walkthrough();
w.setVisible(true);
}//main
} //class




