File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

No 'close' in a JFrame

 
Ransika deSilva
Ranch Hand
Posts: 524
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello world,
I just want to know for JFrame is there a possible way of removing the close(the cross) in the frame. I mean like 'setResizable(false) for not allowing the frame to resize.
Thank you..
 
Mani Ram
Ranch Hand
Posts: 1140
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which Java version you are using?
If you are using JDK 1.4 or above, try setUndecorated(true) method (I have never tried, check it out).
If you are using versions below 1.4, then you have to use JWindow instead of a JFrame.
 
Jason Menard
Sheriff
Posts: 6450
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to the Swing / JFC / AWT forum. Please post followups there.
 
narayana murthy pedapudi
Ranch Hand
Posts: 42
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Framename.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE );
it will display the cross mark but won't do any action..i mean it won't close....if u want to remove that button there is no option in java..
by the by why do u want to do that..let me know the necessity..
bye
u can mail me even to p_narayanamurthy@yahoo.com
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic