Here you can find the source of createIFrame(String name)
public static JInternalFrame createIFrame(String name)
//package com.java2s; //License from project: Open Source License import java.beans.PropertyVetoException; import javax.swing.JInternalFrame; public class Main { public static JInternalFrame createIFrame(String name) { JInternalFrame iFrame = new JInternalFrame(name, true, true, true, true); iFrame.setBounds(0, 0, 400, 400); // iFrame.requestFocusInWindow(); iFrame.setDefaultCloseOperation(JInternalFrame.DISPOSE_ON_CLOSE); // iFrame.toFront(); try {// w w w . java 2 s .c o m iFrame.setSelected(true); } catch (PropertyVetoException e1) { e1.printStackTrace(); } iFrame.setVisible(true); return iFrame; } }