Files
swing-examples/Writerside2/topics/Look-and-Feel.md
2024-06-12 13:10:10 +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();