Improved code readability
[sixth-3d-demos.git] / src / main / java / eu / svjatoslav / sixth / e3d / examples / launcher / Main.java
1 /*
2  * Sixth 3D engine demos. Author: Svjatoslav Agejenko. 
3  * This project is released under Creative Commons Zero (CC0) license.
4  *
5 */
6
7 package eu.svjatoslav.sixth.e3d.examples.launcher;
8
9 import javax.swing.*;
10 import java.awt.*;
11
12
13 class Main {
14
15     public static void main(final String[] args) {
16         buildAndShowGuiWindow();
17     }
18
19     /**
20      * Builds and shows the main window of the application.
21      */
22     private static void buildAndShowGuiWindow() {
23         JFrame frame = new JFrame("Sixth 3D engine demos");
24
25         // Keep application running until last frame is closed.
26         frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
27
28         frame.getContentPane().setLayout(new BorderLayout());
29         frame.getContentPane().add(new ApplicationListPanel(), BorderLayout.CENTER);
30         frame.setSize(400, 300);
31
32         frame.setLocationRelativeTo(null); // center frame on screen
33         frame.setVisible(true);
34     }
35
36 }