Jump to content

How to set jframe to full screen in java?

Shammikit

i found this code online,what it does is open up a blank jframe behind my jframe and that is displayed in full screen. i want to put my current jframe to fullscreen.can someone please help me with it

The code i found:

 

Link to comment
Share on other sites

Link to post
Share on other sites

Try to add this to your code:

setExtendedState(JFrame.MAXIMIZED_BOTH);
setUndecorated(true);
setVisible(true);

 

My Rig: AMD Ryzen 5800x3D | Scythe Fuma 2 | RX6600XT Red Devil | B550M Steel Legend | Fury Renegade 32GB 3600MTs | 980 Pro Gen4 - RAID0 - Kingston A400 480GB x2 RAID1 - Seagate Barracuda 1TB x2 | Fractal Design Integra M 650W | InWin 103 | Mic. - SM57 | Headphones - Sony MDR-1A | Keyboard - Roccat Vulcan 100 AIMO | Mouse - Steelseries Rival 310 | Monitor - Dell S3422DWG

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×