From: Svjatoslav Agejenko Date: Wed, 21 Jun 2023 21:19:36 +0000 (+0300) Subject: Improved code readability X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=commitdiff_plain;h=d5fe10f330481170112c7cc7576d181c982194e1;p=sixth-3d-demos.git Improved code readability --- 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 f972085..0d15f43 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 @@ -9,6 +9,9 @@ package eu.svjatoslav.sixth.e3d.examples.launcher; import javax.swing.*; import java.awt.*; +import static java.awt.BorderLayout.CENTER; +import static javax.swing.WindowConstants.DISPOSE_ON_CLOSE; + class Main { @@ -23,10 +26,10 @@ class Main { JFrame frame = new JFrame("Sixth 3D engine demos"); // Keep application running until last frame is closed. - frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); + frame.setDefaultCloseOperation(DISPOSE_ON_CLOSE); frame.getContentPane().setLayout(new BorderLayout()); - frame.getContentPane().add(new ApplicationListPanel(), BorderLayout.CENTER); + frame.getContentPane().add(new ApplicationListPanel(), CENTER); frame.setSize(400, 300); frame.setLocationRelativeTo(null); // center frame on screen