mirror of
https://github.com/OMGeeky/ATCS.git
synced 2026-01-22 11:15:29 +01:00
improve some checks when switching look and feel
This commit is contained in:
@@ -162,21 +162,12 @@ public class StudioFrame extends JFrame {
|
||||
changeLaF.add(lafItem);
|
||||
lafItem.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
try {
|
||||
UIManager.setLookAndFeel(i.getClassName());
|
||||
ATContentStudio.scaleUIFont();
|
||||
SwingUtilities.updateComponentTreeUI(ATContentStudio.frame);
|
||||
ConfigCache.setFavoriteLaFClassName(i.getClassName());
|
||||
} catch (ClassNotFoundException e1) {
|
||||
e1.printStackTrace();
|
||||
} catch (InstantiationException e1) {
|
||||
e1.printStackTrace();
|
||||
} catch (IllegalAccessException e1) {
|
||||
e1.printStackTrace();
|
||||
} catch (UnsupportedLookAndFeelException e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
public void actionPerformed(ActionEvent e1) {
|
||||
String lookAndFeel = i.getClassName();
|
||||
ATContentStudio.setLookAndFeel(lookAndFeel);
|
||||
SwingUtilities.updateComponentTreeUI(ATContentStudio.frame);
|
||||
ConfigCache.setFavoriteLaFClassName(lookAndFeel);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user