- private ImagePanel imagePanel1;
-
- public ImageFrame(final String title) {
- super();
- setTitle(title);
- initGUI();
- }
-
- 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();
- }
- }
-
- /**
- * 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);
- }
- });
- }
+ 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;
+ }
+
+ 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();
+ }
+ }