Example usage for javax.swing JFrame getParent

List of usage examples for javax.swing JFrame getParent

Introduction

In this page you can find the example usage for javax.swing JFrame getParent.

Prototype

public Container getParent() 

Source Link

Document

Gets the parent of this component.

Usage

From source file:fsart.diffTools.gui.DiffToolsGui.java

public static void main(String[] args) {
    //Create and set up the window.
    JFrame frame = new JFrame("DiffTools");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    log.debug("Demarrage de l'application");

    DiffToolsMainPanel gui = new DiffToolsMainPanel();

    frame.add(gui.getPanel());/*  w  w  w  . j ava2  s  .co m*/
    frame.setMinimumSize(gui.getPanel().getMinimumSize());
    frame.pack();
    //frame.setMinimumSize(gui.getPanel().getMinimumSize());
    frame.setLocationRelativeTo(frame.getParent());
    frame.setVisible(true);
    //System.exit(0);
}