2024-06-12
This commit is contained in:
20
Writerside2/topics/Look-and-Feel.md
Normal file
20
Writerside2/topics/Look-and-Feel.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# Look and Feel
|
||||
|
||||
```java
|
||||
try {
|
||||
//UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
|
||||
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
|
||||
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException |
|
||||
UnsupportedLookAndFeelException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
```java
|
||||
// 프로그램 실행 후 룩앤필을 변경하는 경우
|
||||
UIManager.setLookAndFeel(lnfName);
|
||||
SwingUtilities.updateComponentTreeUI(frame);
|
||||
frame.pack();
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user