List of usage examples for javax.swing JInternalFrame getY
@BeanProperty(bound = false) public int getY()
From source file:Main.java
public Main() { JInternalFrame frame1 = new JInternalFrame("Frame 1", true, true, true, true); JInternalFrame frame2 = new JInternalFrame("Frame 2", true, true, true, true); frame1.getContentPane().add(new JLabel("Frame 1 contents...")); frame1.pack();/*w w w . j ava 2 s. com*/ frame1.setVisible(true); frame2.getContentPane().add(new JLabel("Frame 2 contents...")); frame2.pack(); frame2.setVisible(true); int x2 = frame1.getX() + frame1.getWidth() + 10; int y2 = frame1.getY(); frame2.setLocation(x2, y2); desktopPane.add(frame1); desktopPane.add(frame2); this.add(desktopPane, BorderLayout.CENTER); this.setMinimumSize(new Dimension(300, 300)); }