import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JTextArea;

public class TestApp {
	public static void main(String[] args) {  
		
	 JFrame fr = new JFrame("abc");
	    fr.setSize(500,500);
	    fr.getContentPane().add(new JButton(new AbstractAction("TEST") {
	      
	      @Override
	      public void actionPerformed(ActionEvent e) {
	        JDialog dlg = new JDialog(fr, false);
	        dlg.setSize(500, 500);
	        dlg.getContentPane().add(new JTextArea());
	        dlg.setVisible(true);
	      }
	    }));
	    fr.setVisible(true);
	  } 
}