List of usage examples for javax.swing JFrame getParent
public Container getParent()
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); }