X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=Tools%2FSource%2FMigrationTools%2Forg%2Ftianocore%2Fmigration%2FFirstPanel.java;fp=Tools%2FSource%2FMigrationTools%2Forg%2Ftianocore%2Fmigration%2FFirstPanel.java;h=c78ad97bb3063604bd7554a02f42fea43f1a8b8c;hp=d0f9151ed7fe613b7ef2f1c134559d610884aa27;hb=4f60c26f936d5e878e9fb941f896868c6f452f18;hpb=482407d3d6faaa8eba7975d425c1e386b75dae6d diff --git a/Tools/Source/MigrationTools/org/tianocore/migration/FirstPanel.java b/Tools/Source/MigrationTools/org/tianocore/migration/FirstPanel.java index d0f9151ed7..c78ad97bb3 100644 --- a/Tools/Source/MigrationTools/org/tianocore/migration/FirstPanel.java +++ b/Tools/Source/MigrationTools/org/tianocore/migration/FirstPanel.java @@ -24,6 +24,8 @@ public final class FirstPanel extends JPanel implements ActionListener, ItemList */ private static final long serialVersionUID = 207759413522910399L; + private static final FirstPanel INSTANCE = FirstPanel.init(); + private String startpath; private ModuleInfo mi; @@ -36,7 +38,7 @@ public final class FirstPanel extends JPanel implements ActionListener, ItemList private boolean tofile = true, toscreen = true; private PrintWriter logfile; - FirstPanel() throws Exception { + FirstPanel() { GridBagLayout gridbag = new GridBagLayout(); setLayout(gridbag); @@ -235,14 +237,17 @@ public final class FirstPanel extends JPanel implements ActionListener, ItemList //---------------------------------------------------------------------------------------// - public static FirstPanel init() throws Exception { - - //UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - //UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel"); - //UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); - //UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel"); - //UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel"); + private static final FirstPanel init() { + try { + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + //UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); + //UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel"); + //UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); + //UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel"); + //UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel"); + } catch (Exception e) { + System.out.println(e.getMessage()); + } JFrame frame = new JFrame("MigrationTools"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); @@ -258,4 +263,8 @@ public final class FirstPanel extends JPanel implements ActionListener, ItemList return fp; } + + public static final FirstPanel getInstance() { + return INSTANCE; + } } \ No newline at end of file