Changed license to CC0
[imagesqueeze.git] / src / main / java / eu / svjatoslav / imagesqueeze / sampleApplication / ImageFrame.java
index 3da2f77..2c069cf 100755 (executable)
@@ -1,49 +1,49 @@
+/*
+ * Image codec. Author: Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
+ * This project is released under Creative Commons Zero (CC0) license.
+ */
 package eu.svjatoslav.imagesqueeze.sampleApplication;
-import java.awt.BorderLayout;
-
-import javax.swing.WindowConstants;
-import javax.swing.SwingUtilities;
 
+import javax.swing.*;
+import java.awt.*;
 
 public class ImageFrame extends javax.swing.JFrame {
-       private ImagePanel imagePanel1;
+    private ImagePanel imagePanel1;
+
+    public ImageFrame(final String title) {
+        super();
+        setTitle(title);
+        initGUI();
+    }
+
+    /**
+     * Auto-generated main method to display this JFrame
+     */
+    public static void main(final String[] args) {
+        SwingUtilities.invokeLater(() -> {
+            final ImageFrame inst = new ImageFrame("test");
+            inst.setLocationRelativeTo(null);
+            inst.setVisible(true);
+        });
+    }
+
+    public ImagePanel getImagePanel() {
+        return imagePanel1;
+    }
 
-       /**
-       * Auto-generated main method to display this JFrame
-       */
-       public static void main(String[] args) {
-               SwingUtilities.invokeLater(new Runnable() {
-                       public void run() {
-                               ImageFrame inst = new ImageFrame("test");
-                               inst.setLocationRelativeTo(null);
-                               inst.setVisible(true);
-                       }
-               });
-       }
-       
-       public ImageFrame(String title) {
-               super();
-               setTitle(title);
-               initGUI();
-       }
-       
-       private void initGUI() {
-               try {
-                       BorderLayout thisLayout = new BorderLayout();
-                       setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
-                       getContentPane().setLayout(thisLayout);
-                       {
-                               imagePanel1 = new ImagePanel();
-                               getContentPane().add(getImagePanel(), BorderLayout.CENTER);
-                       }
-                       pack();
-               } catch (Exception e) {
-                       e.printStackTrace();
-               }
-       }
-       
-       public ImagePanel getImagePanel() {
-               return imagePanel1;
-       }
+    private void initGUI() {
+        try {
+            final BorderLayout thisLayout = new BorderLayout();
+            setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
+            getContentPane().setLayout(thisLayout);
+            {
+                imagePanel1 = new ImagePanel();
+                getContentPane().add(getImagePanel(), BorderLayout.CENTER);
+            }
+            pack();
+        } catch (final Exception e) {
+            e.printStackTrace();
+        }
+    }
 
 }