You can't remove close Button from JFrames, but you can disable by calling setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE) on that JFrame.
Yes...I am already calling that function.My concern is It doen't look like it's disabled.so i wanna change it's icon or i totally wanna remove that close button.because it is just misleads to the user.
Actually you could try this but I really don't think it's what you want, it's going to remove all window decorations (there will be no title bar, etc.) and I'm not even sure if it's supported on all platforms. I don't think it works on pre 1.4 either.
Also look into JWindow which is similar, no titlebar with buttons and what not. [ August 10, 2003: Message edited by: Ken Blair ]
Ken, your right ...it doesn't work prior to jdk1.4. besides,I want to keep all other buttons,Title(Frame/Window decorations).Thanks for u r sussestion,I came to know something new with your posting.
I know this is an old thread now, but i found it while searching for the answer to the problem myself. I post this here as I found this way the best for me, perhaps someone else searching for this finds it useful..
Welcome to JavaRanch, Sean. Thank you. Actually there are ways to remove the X button from a JFrame, somebody showed us how last year, but I can't remember when.