import javax.swing.*;
import java.awt.Graphics;
import java.awt.*;
import java.awt.event.*;
public class FrameGraphic extends JFrame
{  
	JPanel d;
 
   public FrameGraphic(String a,JPanel di)
   {    super(a);	 
        d=di;
        add(d);
   }
   
   public static void plot(String a,JPanel di)
   {
        FrameGraphic f = new FrameGraphic(a,di);
        f.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
        f.setSize(800,500);
        f.setVisible(true); 
   }

}

