2 * Imagesqueeze - Image codec optimized for photos.
3 * Copyright (C) 2012, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of version 2 of the GNU General Public License
7 * as published by the Free Software Foundation.
10 package eu.svjatoslav.imagesqueeze.sampleApplication;
12 import java.awt.BorderLayout;
14 import javax.swing.SwingUtilities;
15 import javax.swing.WindowConstants;
17 public class ImageFrame extends javax.swing.JFrame {
18 private ImagePanel imagePanel1;
20 public ImageFrame(final String title) {
26 public ImagePanel getImagePanel() {
30 private void initGUI() {
32 final BorderLayout thisLayout = new BorderLayout();
33 setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
34 getContentPane().setLayout(thisLayout);
36 imagePanel1 = new ImagePanel();
37 getContentPane().add(getImagePanel(), BorderLayout.CENTER);
40 } catch (final Exception e) {
46 * Auto-generated main method to display this JFrame
48 public static void main(final String[] args) {
49 SwingUtilities.invokeLater(new Runnable() {
52 final ImageFrame inst = new ImageFrame("test");
53 inst.setLocationRelativeTo(null);
54 inst.setVisible(true);