Moved bit input and output streams into Svjatoslav Commons library.
[imagesqueeze.git] / src / main / java / eu / svjatoslav / imagesqueeze / sampleApplication / ImageFrame.java
index 3da2f77..2b68ef7 100755 (executable)
@@ -1,35 +1,35 @@
+/*
+ * Imagesqueeze - Image codec optimized for photos.
+ * Copyright (C) 2012, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public License
+ * as published by the Free Software Foundation.
+ */
+
 package eu.svjatoslav.imagesqueeze.sampleApplication;
+
 import java.awt.BorderLayout;
 
-import javax.swing.WindowConstants;
 import javax.swing.SwingUtilities;
-
+import javax.swing.WindowConstants;
 
 public class ImageFrame extends javax.swing.JFrame {
        private ImagePanel 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) {
+       public ImageFrame(final String title) {
                super();
                setTitle(title);
                initGUI();
        }
-       
+
+       public ImagePanel getImagePanel() {
+               return imagePanel1;
+       }
+
        private void initGUI() {
                try {
-                       BorderLayout thisLayout = new BorderLayout();
+                       final BorderLayout thisLayout = new BorderLayout();
                        setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
                        getContentPane().setLayout(thisLayout);
                        {
@@ -37,13 +37,23 @@ public class ImageFrame extends javax.swing.JFrame {
                                getContentPane().add(getImagePanel(), BorderLayout.CENTER);
                        }
                        pack();
-               } catch (Exception e) {
+               } catch (final Exception e) {
                        e.printStackTrace();
                }
        }
-       
-       public ImagePanel getImagePanel() {
-               return imagePanel1;
+
+       /**
+        * Auto-generated main method to display this JFrame
+        */
+       public static void main(final String[] args) {
+               SwingUtilities.invokeLater(new Runnable() {
+                       @Override
+                       public void run() {
+                               final ImageFrame inst = new ImageFrame("test");
+                               inst.setLocationRelativeTo(null);
+                               inst.setVisible(true);
+                       }
+               });
        }
 
 }