title: How I can open new frame when clicked on insert? By using only applet concept
body: <p>I want my button "insert", when clicked to open new applet/window and close existing applet. Please try to give me method which don't use concepts like <code>JFrame</code>  and <code>JButton</code>  etc. This is just front end. I'm going to use MONGODB at backend.</p>
  
  <pre><code>public class testd  extends Applet implements ActionListener,ItemListener
  {
  Button insert,update,delete,view,report,search;
  TextField na,am,sts,nr;
  TextArea t;
  Label head;
  Choice down;
  
  Checkbox si,sr;
  CheckboxGroup g;
  
  Button submit,cancel;
  
  public void init()
  {
      setBackground(Color.white);
      setForeground(Color.black);
       this.setSize(new Dimension(500,500));
      setLayout(new FlowLayout());
      /////creating panel//////////////////
      Panel p1=new Panel(new GridLayout(3,5,7,4));
      head=new Label("        WELCOME        ");
      head.setFont(new Font("Courier",Font.BOLD,48));
  
      p1.add(head);
  
      add(head,"North");
  /////////////////////creating menu///////////////////////    
      insert=new Button("INSERT");
      update=new Button("UPDATE");
  
      delete=new Button("DELETE");
      view=new Button("VIEW");
      report=new Button("REPORT");
      search=new Button("SEARCH");
   Font myFont = new Font("Arial", Font.ITALIC,30);
         insert.setFont(myFont);
         update.setFont(myFont);
         delete.setFont(myFont);
         view.setFont(myFont);
         report.setFont(myFont);
         search.setFont(myFont);
  
      down=new Choice();
      down.add("Machine Records");
      down.add("Machine Worksheet ");
      down.add("Machine Maintaince Record");
      down.add("Employee Record");
      down.add("Empoyee Worsheet");
      down.add("Raw Materail Record");
      down.add("Production Record");
      down.add("Account");
      down.setFont(myFont);
  
  
  
      //submit=new Button("SUBMIT");
      cancel=new Button("EXIT");
  
      add(insert);
      insert.addActionListener(this);
      add(update);
      add(view);
      add(search);
      add(delete);
      add(report);
      add(down);
      //add(submit);
  
  
  
      add(cancel);
  
      down.addItemListener((ItemListener) this);
  
  
  }
  @Override
  public void actionPerformed(ActionEvent ae) {
  
  
  
          if(down.getSelectedItem().equals("Machine Records"))
              {
              if( ae.getSource()==insert)
                 {
                    /*WHAT TO ADD HERE TO OPEN NEW APPLET/WINDOW/*
                 }
              }
  
  
  }
  </code></pre>