title: JFrame inside JApplet
body: <p>I have program which based on JFrame. now I want to run it on web page. it seems I must use JApplet . what should I do ? can I have JApplet window and many JFrame windows and it can run on the web? </p>
  
  <pre><code>package Interface;
  import java.awt.FlowLayout;    
  import javax.swing.JApplet;
  import javax.swing.JButton;
  import javax.swing.JFrame;
  import javax.swing.JLabel;
  import javax.swing.JMenu;
  import javax.swing.JMenuBar;
  import javax.swing.JMenuItem;    
  import Interface.Menu.block;    
  
  public class Menu extends JApplet {
      static int rows=8;
      static int cols=8;
      MenuLabel menulabel ;
       public enum block
          {Ground,Wall,Ice,Trap,Box;
          }
       public static Start start; 
  
      @Override
  
      public void init() {
  //      super("Menu");    
  //      this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          this.setVisible(true);
          this.setLayout(null);
          this.setBounds(300, 100, 600,600);
          menulabel= new MenuLabel(8,8);
          add(menulabel);
          Main.menu=this;
          JMenuBar load=new JMenuBar();
          load.add(new Loadbutton());
          new JFrame().setVisible(true);
          add(load);
  
          Startbutton Start = new Startbutton(this);
          Loadbutton Load =new Loadbutton();
          Editbutton Edit = new Editbutton();
          add(Start);
          add(Load);
          add(Edit);
  
          paint(this.getGraphics());
      }    
  };
   class MenuLabel extends JLabel implements Cloneable
  {  
       int rows,cols;
      public  MenuMap [][] menumap;
      MenuLabel(int rows,int cols)
      {
          Menu.rows=rows;
          Menu.cols=cols;
          this.rows=rows;
          this.cols=cols;
          setBounds(140,100,580,580);
          menumap=new MenuMap[rows][cols];
          add(new JButton("sds"));
          for(int i=0;i&lt;rows;i++)
              for(int j=0;j&lt;cols;j++)
              {
                  menumap[i][j]=new MenuMap(j*50,i*50,block.Ground);
                  menumap[i][j].setBounds(j*50, i*50, 50, 50);
                  add(menumap[i][j]);
              }
      }
      void changeCell(int x ,int y,Menu.block b)
      {
          removeAll();            
          menumap[x][y]=new MenuMap(menumap[x][y].getX(), menumap[x][y].getY(),b);
          for(int i=0;i&lt;Menu.rows;i++)
              for(int j=0;j&lt;Menu.cols;j++)
                  add(menumap[i][j]);
      }
      public MenuLabel(MenuLabel another)
      {
          this.cols=another.cols;
          this.rows=another.rows;
          setBounds(140,100,580,580);
          menumap=new MenuMap[rows][cols];
          add(new JButton("sds"));
          for(int i=0;i&lt;rows;i++)
              for(int j=0;j&lt;cols;j++)
              {
                  menumap[i][j]=new MenuMap(j*50,i*50,
                  Menu.block.valueOf(another.menumap[i][j].getText()));
                  menumap[i][j].setBounds(j*50, i*50, 50, 50);
                  add(menumap[i][j]);
              }
      }
      MenuMap getCell(int i, int j)
      {
          return menumap[i][j];
      }
      public int getRows(){return this.rows;}
      public int getCols(){return this.cols;}    
  }
  </code></pre>