Win a copy of Java Challengers this week in the Java in General forum!
  • 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
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

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 ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic