I'm putting together a quick and dirty animation using swing. I would like the window to be maximized. How can I do that?
Provided that you are extending JFrame:
public void run() { MyFrame myFrame = new MyFrame(); myFrame.setVisible(true); myFrame.setExtendedState(myFrame.getExtendedState() | JFrame.MAXIMIZED_BOTH); }
1.4m articles
1.4m replys
5 comments
56.9k users