This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

getting rid of the closing x in the upper right hand corner  RSS feed

 
Chris Fetterley
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
basically I want to know how to get rid of it...but still have the function of closing the window.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use a JWindow or Window instead of a Frame or JFrame, or you can call setUndecorated( true ). But really all any of these do is completely remove the title bar and all buttons from the frame. If you just want to remove the close button I think you are pretty much out of luck, unless you want to do a lot of JNI work to somehow natively do this.

Not sure if this answers your question... give a little more information on what you are trying to do...
 
Chris Fetterley
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well that pretty much sums it up....but I do not want to get rid of the title bar....I can handle the fact that it's there....it was more of a question I was asked that I didn't know the answer to
thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!