Java GUI Framework Question: Download Questions PDF
How to replace/remove the icon in the title bar (window decoration) of a [J]Frame?
Answer:
Use setIconImage().
To revert to the platform's default icon use:
frame.setIconImage(null);
On some platforms this might remove the icon. Alternatively you can try a transparent Image if you don't want to have an icon.
To revert to the platform's default icon use:
frame.setIconImage(null);
On some platforms this might remove the icon. Alternatively you can try a transparent Image if you don't want to have an icon.
Download Java GUI Framework Interview Questions And Answers
PDF
Previous Question | Next Question |
How to (de)iconify a window? | How to replace the icon in the title bar (window decoration) of a [J]Dialog? |