I know I can specify one for each form, or for the root form and then it’ll cascade through to all of the children forms, but I’d like to have a way of overriding the default Java Coffee Cup for all forms even those I might forget.
Any suggestions?
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.
No related questions found
You can make the root form (by which I assume you mean
JFrame) be your own subclass ofJFrame, and put standard functionality in its constructor, such as:You can bundle other standard stuff in here too, such as memorizing the frame’s window metrics as a user preference, managing splash panes, etc.
Any new frames spawned by this one would also be instances of this
JFramesubclass. The only thing you have to remember is to instantiate your subclass, instead ofJFrame. I don’t think there’s any substitute for remembering to do this, but at least now it’s a matter of remembering a subclass instead of asetIconImagecall (among possibly other features).