How can i disable the close button (or make it disappear completely if possible) in a java JFace dialog?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
See here for an example showing how to hide the close button in a
Dialog. You simply override following method:Otherwise override
close()and return false to prevent closing.Update: While the above code “solves” the problem at hand, it doesn’t explain a lot, and introduces a nasty bug. Please see Goog’s answer, for a way better version.