activated = false;
      public MyInternalFrame() {         super("#" + (++openFrameCount),              true, //resizable              true, //closable              true, //maximizable              true);//iconifiable         //...Create the GUI and put it in the window...         //...Then set the window size or call pack...         setSize(300,300);         //Set the window's location.         setLocation(xOffset*openFrameCount, yOffset*openFrameCount);         addInternalFrameListener(new InternalFrameAdapter() {//               public void internalFrameActivated(InternalFrameEvent e) {//                  paintme();//   //                  displayMessage("Internal frame activated", e);//              }            public void internalFrameClosing(InternalFrameEvent e) {               displayMessage("Internal frame closing", e);               disconnectMe();            }            public void internalFrameClosed(InternalFrameEvent e) {               displayMessage("Internal frame closed", e);            }            public void internalFrameOpened(InternalFrameEvent e) {               displayMessage("Internal frame opened", e);            }            public void internalFrameIconified(InternalFrameEvent e) {               displayMessage("Internal frame iconified", e);            }            public void internalFrameDeiconified(InternalFrameEvent e) {               displayMessage("Internal frame deiconified", e);            }            public void internalFrameActivated(InternalFrameEvent e) {               displayMessage("Internal frame activated", e);               repaint();            }            public void internalFrameDeactivated(InternalFrameEvent e) {               displayMessage("Internal frame deactivated", e);            }            });          }