How to set the icon for the entire application with JFrame.setIconImage

I set the icon on the main frame using JFrame.setIconImage(). The icon is shown properly in the main frame.
If more JFrames are opened from the main frame, the newly opened JFrames also show the icon.
However if JDialogs are opended, in some cases the icon set on the main frame is shown and in other cases the coffee cup.
What is JFrame.setIconImage() expected to do? Setting the icon for a single JFrame or the entire application?
How can I set the icon for the entire application?
How can I set the icon for JDialogs?
Thank you

In order for your dialogs to use the same icon as the frame, you must parent the dialogs to the frame which has the custom icon.
See the following thread for more information: http://forum.java.sun.com/thread.jsp?forum=57&thread=362542
cheers,
Greg

Similar Messages

  • How to set different icons for different windows which is seen in the top left corner?

    Hi
    How to set different icons for different windows which is seen in the top left corner? I know when building exe there is a option to edit icons or add icons and that icon is default for all the windows in the project. But i want different icons for different windows which is possible in VB.
    Is there any way to set icon by calling any dlls.
    Thanks & Regards
    Samuel J
    [email protected]

    Hi Sam,
    no problem. See the attachment.
    Mike
    Attachments:
    TestIcon_LV85.zip ‏44 KB

  • I got home today and got a message on Messages or IMessage and the Messages app would not open i restarted my computer and it had a question mark as the icon for the app. Help!?!?! What does this meen how can i prevent further damage or fix damage delt

    I got home today and got a message on Messages or IMessage and the Messages app would not open i restarted my computer and it had a question mark as the icon for the app. Help!?!?! What does this meen how can i prevent further damage or fix damage delt

    Is this what you see when you start up your MBP?
    http://support.apple.com/kb/ts1440
    Ciao.

  • I updated to OS X 10.8.5 and the icons for the files of one app have turned generic. How do I fix this?r

    I updated to OS X 10.8.5 and the icons for the files of one app were originally for another app (and opened it). I was able to make the files open the the original app but now the icons have turned generic. How do I fix this?

    Download Mavericks from the Mac App Store.
    (95518)

  • HT201401 I 'lost' the icon for the camera.  how do I retrieve it?

    I 'lost' the icon for the camera.  how do I retrieve it?

    Check Settings>General>Restrictions to be sure Camera is On.  If it is, swipe your screens to the right and search for Camera.  If it's hiding in a folder, the name of the folder will appear to the right of Camera.  If you don't see a folder name, it's not in a folder, but is on one of your screens so search for it.  If all else fails, go to Settings>General>Reset>Reset Home Screen Layout.  This will restore the original home screen layout but will rearrange your apps in order to do so.

  • How can I change the icon for the bookmarks menu button

    Using linux, the default icon for the bookmarks menu button is quite ugly. Is there a way to change the icon for the button with some code in userChrome.css ?

    After several intents, I found a solution.
    This is my userChrome.css file:
    @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
    toolbarbutton[class="toolbarbutton-1"]#bookmarks-menu-button image[class="toolbarbutton-icon"] {
    list-style-image: url("bookmark_gray.png") !important;
    -moz-image-region: rect(0px, 0px, 0px, 24px) !important;}
    Probably it's messy but works.

  • The other day I had downloaded the latest version of Firefox and now none of the icons for the different websites I normally go to are there?

    As I said, the other day I had downloaded the latest version of Firefox and after doing so none of the icons for the different websites that normally go to are no longer there. Websites such as MSNBC, MSN, Most visited, that entire strip is no longer visible. I tired resetting Firefox and still nothing. Can anyone tell me how to get them to appear again? It's a hassle every time that I want to go to one of those sites I have to type it in the search bar, instead of just clicking on it as I did before. Please keep in mind if you answer, that I'm still learning about these things called computers and not very well versed in some of the things that you experts know:) Thanks

    On Windows XP Firefox shows the menu bar by default and not the orange Firefox menu button that is shown when the menu bar is hidden.<br />
    The menu bar is the toolbar at the top that shows menu items like File, Edit, View, History, Bookmarks, Tools, Help.<br />
    You can press the F10 key or tap the Alt key to bring up the "Menu Bar" temporarily in case this bar is hidden (View > Toolbars or Firefox > Options).
    The Navigation Toolbar shows the Back and forward button and the input field where you type the address of a site that you want to visit (aka location bar) and also has a search bar where you can type items that you want to look up with a search engine (Google).
    See also:
    *https://support.mozilla.org/kb/how-do-i-get-firefox-button
    *https://support.mozilla.org/kb/Menu+bar+is+missing
    *https://support.mozilla.org/kb/Browsing+basics
    *https://support.mozilla.org/kb/Tabbed+browsing
    You can attach a screenshot in case you still have problems with the toolbars to show what you want to change.
    *http://en.wikipedia.org/wiki/Screenshot
    *https://support.mozilla.org/kb/how-do-i-create-screenshot-my-problem
    Use a compressed image type like PNG or JPG to save the screenshot.

  • How to set different Icons for Jtreenode

    How to set different Icons for Jtreenode,i want to set icons for jtreenode,not only for leaf,open,closeicon,i hope that each node has a different icon.Thanks!

    you need to check for the node value within a renderer, then assign an icon based on what you expect to get back.
    check out this page. http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html

  • The Icon for the Camera is gone?

    the Icon for the Camera is gone? How do I get the Camera to work again? It is a Ipad2 16G

    Check restrictions
    Settings>General>Restrictions>Camera

  • HT202159 Problem with Update on   It started, then the screen went white and the icons for the apps on the desktop were all blackened, 'waiting'.  What now?

    It showed a number of apps to be updated on my iPad, so I clicked 'update all' as usual.  It started, then the screen went white.  The icons for the apps on the desktop went black, as they do, with the first one half way around the little circle timer, and two marked 'waiting', with others not that far into the process.  They all stopped.  Now I can't stop the update process in the App Store, or use any of the apps.  What do I do next?  Help, please!

    Hello there, Rev Susi.
    From what I can gather you have a few apps that only display "Waiting". The following is a past discussion that dealt with a similar issue, the answer may help you as well:
    App updates won't download on my...: Apple Support Communities
    https://discussions.apple.com/thread/4111336
    Try tapping the App, so that it changes to Paused instead of Waiting, then tap it again to resume the install.
    Make sure you don't have any paused downloads in other apps either, like the App Store or iTunes Store.
    If that doesn't do it, try resetting or restoring the iPhone.
    via whatheck
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • I get the icon for "The song can't be located

    I get the icon for "The song can’t be located; it may have been moved or delete" but it is there and if I play it it does play.  However, it will not sync.  I have thousands of songs in iTunes and this appears on many of them.  Is there a quicker way of clearing the icon other than playing each track?

    That icon does indeed mean that the file cannot be located (I just needed to confirm this, to avoid future confusion).
    When you start iTunes, any external storage locations need to be ready to read and have the same drive letter associated with the drive as it did when you added the songs to your iTunes Library. If these conditions are not met, then iTunes will be unable to find the file.
    In addition, if the file has been renamed, moved (but still on the same drive) or even deleted, by you, or any other programme, then once again, your iTunes will not be able to find the file, hence the exclamation mark.
    I'm no experrt on NAS storage, but essentially, the file path to the song's file must remain constant. iTunes looks for the files as soon as it starts up.
    If all your Librayr is external to the computer, you could try re-linking the whole Library to iTunes. Alternatively, I think it's going to be one at a time.

  • The icon for the dictionary-thesaurus has disappeared. What is that file called?

    The icon for the dictionary-thesaurus has disappeared. What is that file called? I found it - Dashboard.

    Symantec have made an update for their add-ons to work in Firefox 4, but they only listed them as compatible with Firefox 4.0, they need to update them to let them work in Firefox 4.0.1, they have indicated this will be happening soon. For details see http://community.norton.com/t5/Norton-Internet-Security-Norton/Norton-product-compatibility-with-Firefox-Updates/m-p/443808

  • I just get my new I pophone 4s and the icon for the face time is not showing in the screen

    I just get my new I pophone 4s and the icon for the face time is not showing in the screen

    There is no separate icon for FaceTime. You access it through contacts. Go into the contact you want to call and tap the FaceTime button.

  • TS3276 I can not open gmail attachments  on my iPad, the icon for the file is a down arrow

    I can not open gmail attachments  on my iPad, the icon for the file is a down arrow....  that only happend on Gmail account

    It could be just an issue with the gmail server. I don't know what settings can be made for attatchments there. I generally leave those messages with large attatchments alone and view them on the computer. I was finding that certain large files like .wmv would sometimes take 5 to 10 minutes to open on the iPad.
    Yes it's aggrivating, but I don't have that answer either.

  • TS3297 For my game purchase cannot be success .. After I click on the icon for the purchase they will show me contact I-tunes support for complete the transaction ....for I have already contact AppleCare for assist.... And they told me is the server syste

    For my game purchase cannot be success .. After I click on the icon for the purchase they will show me contact I-tunes support for complete the transaction ....for I have already contact AppleCare for assist.... And they told me is the server system down
    Kindly get back to me ASAP!
    Thanks.

    Jay cole Ong wrote:
    After I click on the icon for the purchase they will show me contact I-tunes support for complete the transaction ....
    To Contact iTunes Support...
    Use this Link  >  Apple  Support  iTunes Store  Contact

Maybe you are looking for

  • Is Adobe Media Encoder included in Photoshop CS6?

    Is Adobe Media Encoder included in Photoshop CS6?  If it is how do I access it? Message was edited by: Kevin Monahan Reason: added more descriptive title

  • Deploying Office 365 Pro Plus via SCCM

    Hi I am trying to deploy Office 365 Pro Plus via SCCM, I followed this process https://gallery.technet.microsoft.com/How-To-Deploying-Office-70e8b1eb#content , we don't use the application catalogue but I made the application available to be run via

  • How to respond on my iPhone when it disabled?

    How to respond on my iPhone when it disabled?

  • Error in burn process

    Hi, I made an iDVD project with slideshows, and an iMovie intro. When I select burn, it goes through and gets all the way to the final step of burning. When it begins to burn it immediately comes up with Error #-1 was reported and then no other optio

  • Create Material With BAPI_MATERIAL_SAVEDATA

    Hi, I New To SAP I'm Trying To Create Material With BAPI_MATERIAL_SAVEDATA . When I Execute The Code I am Getting Message That ' Bytes Transfered' But When I Checking The MARA Table I Cannot Find The Enteries.. ***************************************