From: Svjatoslav Agejenko Date: Thu, 5 Jul 2018 23:31:24 +0000 (+0300) Subject: Code refactoring. X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=commitdiff_plain;ds=inline;h=b2c4a8941f5a618b83913fa1a1456d1ef2f77e77;hp=5d214bee2a41d15d3a12562b4a7e7b36b777bd97;p=sixth-3d-demos.git Code refactoring. --- diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/examples/launcher/LauncherFrame.java b/src/main/java/eu/svjatoslav/sixth/e3d/examples/launcher/LauncherFrame.java deleted file mode 100755 index bbb9e32..0000000 --- a/src/main/java/eu/svjatoslav/sixth/e3d/examples/launcher/LauncherFrame.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Sixth 3D engine demos. Copyright ©2012-2016, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 3 of the GNU Lesser General Public License - * or later as published by the Free Software Foundation. - */ - -package eu.svjatoslav.sixth.e3d.examples.launcher; - -import javax.swing.*; -import java.awt.*; - -class LauncherFrame extends javax.swing.JFrame { - - private static final long serialVersionUID = -3679656169594556137L; - - private LauncherFrame() { - super(); - initGUI(); - - } - - /** - * Auto-generated main method to display this JFrame - */ - public static void main(final String[] args) { - SwingUtilities.invokeLater(() -> { - final LauncherFrame inst = new LauncherFrame(); - final BorderLayout instLayout = new BorderLayout(); - inst.setLocationRelativeTo(null); - inst.setVisible(true); - inst.getContentPane().setLayout(instLayout); - }); - } - - private void initGUI() { - getContentPane().add(new MenuPanel()); - pack(); - setSize(390, 300); - } - -} diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/examples/launcher/Main.java b/src/main/java/eu/svjatoslav/sixth/e3d/examples/launcher/Main.java index 5b970d4..512f30c 100755 --- a/src/main/java/eu/svjatoslav/sixth/e3d/examples/launcher/Main.java +++ b/src/main/java/eu/svjatoslav/sixth/e3d/examples/launcher/Main.java @@ -8,14 +8,36 @@ package eu.svjatoslav.sixth.e3d.examples.launcher; -/** - * Main class to launch main menu with examples. - */ +import javax.swing.*; +import java.awt.*; + +class Main extends javax.swing.JFrame { -class Main { + private static final long serialVersionUID = -3679656169594556137L; + private Main() { + super(); + initGUI(); + + } + + /** + * Auto-generated main method to display this JFrame + */ public static void main(final String[] args) { - LauncherFrame.main(args); + SwingUtilities.invokeLater(() -> { + final Main inst = new Main(); + final BorderLayout instLayout = new BorderLayout(); + inst.setLocationRelativeTo(null); + inst.setVisible(true); + inst.getContentPane().setLayout(instLayout); + }); + } + + private void initGUI() { + getContentPane().add(new MenuPanel()); + pack(); + setSize(390, 300); } }