Files
swing-examples/doc/28_look_and_feel.md
2024-03-30 19:57:14 +09:00

525 B

Look and Feel

try {
    //UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException |
         UnsupportedLookAndFeelException e) {
    throw new RuntimeException(e);
}
// 프로그램 실행 후 룩앤필을 변경하는 경우
UIManager.setLookAndFeel(lnfName);
SwingUtilities.updateComponentTreeUI(frame);
frame.pack();