Code refactoring.
[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 class Main {
13
14     public static void main(final String[] args) {
15         buildAndShowGuiWindow();
16     }
17
18     private static void buildAndShowGuiWindow() {
19         JFrame frame = new JFrame("Sixth 3D engine demos");
20
21         // Keep application running until last frame is closed.
22         frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
23
24         frame.getContentPane().setLayout(new BorderLayout());
25         frame.getContentPane().add(new ApplicationListPanel(), BorderLayout.CENTER);
26         frame.setSize(400, 300);
27
28         frame.setLocationRelativeTo(null); // center frame on screen
29         frame.setVisible(true);
30     }
31
32 }