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);
}
}
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();
You can do the following
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.