• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to set Jframe to full screen

 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys does anyone know how to set the jframe to full screen

if u knoe pls reply me asap thank you
very much for yr help

regards,
khai huat
 
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How's this?
 
Ranch Hand
Posts: 229
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually if you really want your frame to become maximized you should use the following method:



If you do not want the frame to show decorations anymore (and really go fullscreen) you can:



Hope this helps...
 
Stephen Boston
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I must admit that is much shorter than mine.
 
Manuel Moons
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes it is a bit shorter but that is not the only advantage. The setState method actually maximizes the window just like when you click on the maximize button on your window.

When calling the setSize (setBounds) methods the window never gets in the maximized state (not even when you make it as large as the screen).
 
Ranch Hand
Posts: 1780
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You probably meant to ask how to maximize JFrame. On the other hand, if
you wanted to go into a "full screen exclusive mode", to do page flipping,
active rendering, change the screen resolution and all that, that's
in a separate part of the API: http://java.sun.com/docs/books/tutorial/extra/fullscreen/index.html
 
reply
    Bookmark Topic Watch Topic
  • New Topic