• 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

Closing Maximizing and Minimizing Buttons

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there a way to get rid of the little Minimizing, Maximizing, and Closing buttons at the top right corrner of a window?

[-][_][X] <-- those buttons
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes,
You can handle the WindowClosing,minimize,maximize events -u can write code in these events-so nothing will happen when the max,min,close-buttons of the frame is pressed.
if u want a different frame without buttons,with different design-why not you can go for IBM's IFrame(extends JFrame)
http://www-128.ibm.com/developerworks/java/library/j-iframe/
 
Ranch Hand
Posts: 367
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi! You can get rid of the minimize,maximize by using a JDialog istead of a JFrame

 
Mabel Ahmad
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot guys for the information and help!! Really appreciated!!

Mathias how would you only get rid of the close button but keep the other 2 buttons?

Thanks again!
 
Mathias Nilsson
Ranch Hand
Posts: 367
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can't.... you can however do nothing on close



This will make the JFrame not closing on the x mark.


you can altso set the setUndecorated(true); on the JFrame. This will remove all the options.

You can use the setResizable(false); if you want to enable a user to maximize a Jframe

// Mathias
[ February 19, 2006: Message edited by: Mathias Nilsson ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic