private void jButton9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton9ActionPerformed
        // TODO add your handling code here:
        JFrame frame= new JFrame();
        //  Label back = new Label("C:\\Users\\Eng Omnia\\Pictures\\project\\images.jpg");
        jFrame3.setVisible(false);

        Board board = new Board();
        board.getPlayer().setDialog(jDialog1);

        //  board.setType(1);
        frame.add(board);
        board.setDialog(jDialog1);
        board.setFrame(frame);
        //board.getPlayer().setPlayer((ImageIcon) button.getIcon());
        board.shortestPath();
        Toolkit tk = Toolkit.getDefaultToolkit();
        Dimension d = tk.getScreenSize();
        frame.setSize(d.width,d.height);


        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        frame.setVisible(true);
}//GEN-LAST:event_jButton9ActionPerformed