JFrame open to screen resolution.

I want to force my class which extends JFrame to open my applications window into the screen resolution I am currently using. I am using Netbeans 5.5. How can I manage this?
[180 byte] By [Antoniosa] at [2007-11-26 16:59:56]
# 1
You can maximize the window by setting the screens extended state. Or can use the toolkit to get the screen size of the user's monitor and set the frame to match.(I like the first option better).
zadoka at 2007-7-8 23:27:43 > top of Java-index,Desktop,Core GUI APIs...
# 2
> I want to force my class which extends JFrame to open my applications > window into the screen resolution I am currently using.personally, I hate applications that change my resolution.Most are quickly deleted.
Michael_Dunna at 2007-7-8 23:27:43 > top of Java-index,Desktop,Core GUI APIs...
# 3
> personally, I hate applications that change my> resolution.> > Most are quickly deleted.I think the OP is talking about making his application's frame fit well on whatever resolution the user has.
zadoka at 2007-7-8 23:27:43 > top of Java-index,Desktop,Core GUI APIs...
# 4
frame.setSize(java.awt.Toolkit.getDefaultToolkit().getScreenSize());
Rannica at 2007-7-8 23:27:43 > top of Java-index,Desktop,Core GUI APIs...
# 5
Thank you for the help all the solutions work fine.
Antoniosa at 2007-7-8 23:27:43 > top of Java-index,Desktop,Core GUI APIs...