Q:

Call the JFrame from another class

i have simple JFRAME (create by Netbeans) and i want to call frame.setState(Frame.NORMAL) from another class. How to do call?
public class Myclass{

     public void Frame_normal{

       ...?
       ???frame.setState(Frame.NORMAL);

     }

}

A:

Basicaly you create an attribute in your class and you give it the reference to your JFrame.
 public class Myclass{

      JFrame frame;

      public MyClass(JFrame aFrame){
           this.frame = aFrame;
      }

      public void Frame_normal{

           frame.setState(Frame.NORMAL);

      }

 }

 MyClass class = new Myclass(theJFrame);
 class.Frame_normal();

