Official way to reuse icons from JOptionPane

I want to use some of the icons that JOptionPane uses in one of my own dialogs. Is there a safe and official way of doing this? I am pretty new to Java and JFC so I could be missing something obvious. I did a search in this forum and found lots of discussion on how to use your own icons instead of the ones JOptionPane provides.
I know I can poke around the library .jar files and find the images and then use code like this:
URL imageURL = loadFromClassLocation.getResource (iconFileName);to load the image but my instincts say that is too fragile. Is there an official way to do this? Perhaps a property defined in the look and feel?
thanks,
Ian

UIManager.getIcon("OptionPane.errorIcon")
UIManager.getIcon("OptionPane.informationIcon")
UIManager.getIcon("OptionPane.warningIcon")
UIManager.getIcon("OptionPane.questionIcon")
The easiest way to find things like this is to look at the source code for the component class and for the component class's ui. Eventually, the resources will be pulled through the ui manager and you can get the key strings. I found these strings in BasicOptionPaneUI::getIconForType.

Similar Messages

  • Official way to transfer video from iPhone 3GS to PC??

    Okay I've read multiple threads online about this and everyone provides 3rd-party application solutions where the applications cost $20 or more. I would imagine there is a simple solution to this problem considering there MUST be some integrated ability to remove videos off of the camera besides email (which doesn't even work if the video file is too large).
    So, I can remove pictures from my camera because the auto-prompt allows me to use Windows XP to browse the pictures on my iPhone, but I cant get at the video. After syncing with iTunes or even without syncing, the iPhone doesn't show up in My Computer so I can't access the videos by browsing the contents of my iPhone either.
    I'm looking for a simple solution or a FREE third party application that will get the job done. Any solutions?

    {quote:title=gumsie wrote:}
    Roaming Gnome has suggested that you use a Scanner & Camera wizard. I suspect this is because on a Mac iPhoto will import the photos and videos. So I can see his logic. {quote}
    In Windows, the scanner/camera wizard searches for and installs items plugged in to USB ports which don't automatically install themselves.
    {quote:title=gumsie wrote:}
    That said I've noticed that when you sync with iTunes there is an option under the Photos tab to choose, +'Include Videos'.+ Not quite sure what to do with this yet. Will post back when I find out.{quote}
    Nope. When I try to sync photos, it copies photos from my PC to my iPhone and puts them in a 'Photo Library', but does not copy anything from 'Camera Roll' to my PC.

  • How can i remove icons from toolbar

    what is best way to remove icons from tool bar?

    On any mac application you should be able to right click (or control-click) on the toolbar and select Customize Toolbar... This will enable you to drag icons off the toolbar or onto the toolbar.
    If you are referring to the Menu bar icons (in the upper right of the screen) then just press Command and then click and drag the icons off the menu bar to remove them.

  • Is there a way to stop Icon View from putting everything in rows?

    I have a couple computers now with Lion, but I miss part of my old Finder view. Is there a way to stop Icon View from putting everything in rows when I do a "sort by" arrange by? I just want sorted icons, not a row of types.
    For instance - I set to arrange by date created and I have a ROW of "Today" A ROW of "Yesterday" another row of "Previouse 7 days" and another row of "Previous 30 Days." I just want a sorted folder of files in icon view listed by created date. These "Rows" are annoying and a pain in the butt to use!

    that´s the point. you are using the wrong sort option. if you want rows you arrange by the button depicted above. in addition you can select how to sort your files (gear wheel button / secondary click context menu)

  • Is there a way to stop the mail icon from bouncing

    Hi all.  Is there a way to stop the mail icon from bouncing on the dock when a new message is received?  It's irritating.  I'm running Lion.  Thanks.
    Kelly

    Thank you Linc.  I knew that I did something in system preferences to cause it to bounce, but couldn't remember what I did.  I appreciate your help!  Kelly

  • Some way or another I've manage to lose the adobe cc and adobe "A" icons from the top of my mac's screen

    Some way or another I've manage to lose the adobe cc and adobe "A" icons from the top of my mac's screen how can I reload them?

    Hi Ed,
    Kindly check the below mentioned link to download the Creative Cloud apps.
    Creative Cloud Help | Download, install, update, or uninstall apps
    Thanks,
    Atul Saini

  • Accidentally deleted icon from Finder column

    I was moving stuff around on my desktop and I accidentally grabbed and made vanish (with that puff of smoke and whooshing sound) whatever icon was located directly below the Macintosh HD icon (above the separator line along the left side) when you click on the Double Mac-face at the top of the Dock (mine's on the left-hand side)...I'm sure it's not a big deal but I'd like to know what it was (since then after a window appears with Macintosh HD and Network icons, I think that only started since I did this).
    Thanks.

    Hi Oliver
    No worries, you can customise the sidebar (which is the official term for that column in Finder windows) any way you like. From the Finder, go to Preferences, then Sidebar. You'll see a list of options to be displayed in the sidebar.
    Matt

  • Any way to see ICONS in Open and Close Dialog boxes?

    Is there any way to see ICONS in Open and Close Dialog boxes, instead of just lists of items names?
    I know you can preview one at a time, but I'd love to see all my artwork as picture icons, just as you can in a finder window.
    Windows does this, but not OSX that I know of. Is there a third party app that enables you to see icon view in the Open and Close Dialogs?

    Thank you Steve Jobs. I guess that feature has been added in Leopard. Now there really is nothing that I'll miss from Windoze.

  • I used Target mode to transfer files to a new iMac running Snow Leopard 10.6.8 from an older Dual core Intel machine (EMC 2105) also on 10.6.8. but originally Tiger 10.4. The operation was successful and I ejected the disk icon from the new machine and po

    IS THE SITUATION HOPELESS
    I used Target mode to transfer files to a new i7  iMac running Snow Leopard 10.6.8 from an older Dual core Intel machine (EMC 2105) also on 10.6.8. but originally Tiger 10.4. The operation was successful and I ejected the disk icon from the new machine and powered down the old machine. When this was restarted the next day there was a grey screen with flashing Mac symbol alternating with a 'no entry' sign and occasionally a question mark.Keyboard and mouse were unusable so k inserted the original instal disc (No.1 for 10.4. with installer 1.0.4) which came with the machine in 2006 in an attempt to boot from this. The ensuing window said this was not possible and now it cannot be ejected.I have tried everything ! It offers Disk Utility and other options like Terminal but that doesn't work either.I 'repaired disk' and that was pronounced o.k. None of the various keystrokes at start up will work, and the computer will only offer the installer disc continually.The only option would seem to be is to erase the hard drive completely from the disc in the machine.I don't want to do this as there is still material which I need to recover. I think the drive has in some way been corrupted by using it in target mode, and I don't know if there are any other options to try.
              Please tell me how to get this disc to eject !

    Graham Giles wrote:
    Have you seen this type of problem before? I think it could be a serious issue for anyone in a similar position.
    No; but then, I've not had occasion to use TDM. I've been using firerwire drives for over 10 years, both FW400 and FW800, with no issues except a bit of instability using a B&W G3 machine.
    TDM should be safe. Using cautious, manual copying of files from the Target machine to the Host machine should not result in unexpected loss of files or damage to the Target drive's directories. It should behave exactly the same as if it were an external (to the Host) firewire drive.
    •  I don't suppose there is anything I can do to 'put back' lost items from a separate Time Machine drive which has an up to date backup on it.
    There is probably a way to do that - seems to me that's one of the reasons for a Time Machine volume.
    On the other hand, if the Time Machine volume is rigidly linked to the now-absent OS on the original drive, there may be no way to effectively access the files in the TM archive.
    I know that using a cloned drive would work well in this instance.
    I have no experience with Time Machine, so perhaps someone who has will chime in with suggestions.
    With the machine in TDM with the other machine, have you tried running Disk Utility to see if you can effect repairs to the drive?

  • How to create a Windows 8.1 Desktop icon from the Metro/Start and/or Search Tool?

    I'm a Desktop user, but often find myself needing to go to the Metro/Start and Search Tool to find programs and App(let)s in order to run them.  However, after doing this several times for many programs, I find myself wanting to create
    Desktop icons to run the programs more easily.  Is there a way to do this from the Metro/Start Icon and/or Search Tool results?
    If not, Microsoft, please consider adding the ability to do this.
    It would be very nice if this ability supported all of the icon types shown in the Metro/Start, Search Tool, and Control Panel interfaces, e.g.: Metro Apps, Desktop Programs, Charms, and Control Panel Applets.
    Currently, there is a way to pin the Metro/Start Icon to the Desktop, but the Taskbar will get very cluttered with even only a handful icons.
    It would be very nice if the desktop icon created by this also supported the context options that the program/app(let) now shows as Tasks when the icon is pinned to the Desktop Taskbar.
    Additionally, it would be nice if I could also simply drag a Pinned Taskbar icon onto the Desktop area, again, retaining it's Tasks as context menu options when the Desktop Taskbar icon is right clicked.
    This ability would be very helpful for people needing to get to programs and App(let)s, without having to resort the Metro/Start and Search Tool, because when there are a lot of Metro/Start icons, I have well over a hundred icons, it
    can be very hard to find one simply eye-balling lot.  The Search feature is much better, provided I know the name to look for and can remember it.
    Finally, this ability would be very helpful, because the kinds of desktop shortcut icons that I can create using the New Shortcut option, assuming that can I find the program/App(let)'s name and path information, do not support the context options
    that the icons could in Windows 7 when an icon is created while installing the program.
    Thanks,
    Howard Brown 
    hrb

    Hi Howard Brown,
    Thanks for your suggestions about Windows user experience. Actually, we are glad to hear more feedback
     about Windows operating system so that we can improve Windows to make it be more easier to
     use.
    As a suggestion for your current situation, you can use Windows Charm Bar to search Apps, it is also easy to use.
    Alex Zhao
    TechNet Community Support

  • How can I remove icons from the desktop on my iPad Mini?

    I understand that there are apps on my iPad that I cannot delete, but is there a way of removing an icon from the desktop?

    Remove, but not uninstall from the device?  Where would they go if you did that?
    Once you delete an App it gets removed form the homescreen, and deleted from the iPad.
    There is no "Less used Apps" area or anything like that.
    Everything you have, and you can access, is on the home screen. There is no other place to access Apps. 

  • How can I remove icons from the Finder sidebar?  Were transferred when I set up laptop from my desktop computer.  Tried dragging off but that didn't work.

    How can I remove icons from the Finder sidebar?  Transferred info from my Mac Pro desktop computer (using target mode) and there were folder icons on the Mac Pro Finder sidebar that are now on the MacBook Finder sidebar, even though these folders do not exist on the MacBook.  Tried to drag them off, which is the usual way to get rid of folders that the user adds to the sidebar (as opposed to those that can be added via the Customize Toolbar dropdown menu) but was unsuccessful.  I then unchecked all of the Customize Toolbar menu items and the folder icons still remained.  What else can I do?

    Did you hold the Command (Apple) key while dragging them off the sidebar? That usually makes them go *poof*.

  • HT1689 i have my daughters iphone 3, i want to use it as an i-pod, but it keeps receiving messages from some her friends is there a way to stop this from happening, please help, my phone is maxed out and would really like the storage for music, thanks

    i have my daughters iphone 3, i want to use it as an i-pod, but it keeps receiving messages from some her friends is there a way to stop this from happening, please help, my phone is maxed out and would really like the storage for music, thanks

    It sounds like it still has her information on it, so it might be efficient to navigate to Settings, then General, then Reset, then Erase All Content and Settings. You can then set up the phone again, using your information. This way the phone will be yours, officially, and her data and information will be removed.

  • I have a macbook running 10.6.8 is there a way to transfer docs from that computer to iCloud

    I have a macbook running 10.6.8 is there a way to transfer docs from that computer to iCloud with out using a third party app like dropbox?

    Yes - if you have the iWorks apps or apps that support iCloud and if you have iCloud setup on the iPad correctly. You do by using Safari on the Mac.
    If you have Pages on both devices - you can log into iCloud.com on the Mac. Sign in, and click on the iWorks icon in the browser window in Safari. Then click on Pages at the top in the next window. Then drag your Pages document from the Mac desktop onto the browser window and the document will be available in Pages on the iPad when you launch it.

  • When you are pulling music from a hard drive and it says music can not be found, is there a way to stop it from doing that every time I play music from my computer? It used to find all music now it only finds 1 song at a time

    When pulling music from a harddrive and it say music can not be found, is there a way to stop this from happening every time I play music on my computer? It used to find all music when serching for song but now it only finds 1 at a time. I have over 2000 songs so I can't go through this every time.

    1) However I do not want to move my itunes Music onto the flash drive, only my Movies, and want to keep my music on my hard drive.
    Is this possible?
    Yes
    2) Do the MacBook Air's not have a separate program other than itunes that can play movies? If so, is there a program I can get to solve this problem? I went onto the App Store to see if there was something I could download, but all the apps were for creating DVD's, not simply playing them.
    If you can play the movies in iTunes, you should be able to open the movie files using Quicktime, which should already be on your system.  If you have already transferred the files to your flash drive, open the flash drive in Finder, and hold control when you click on the movie file (or right click if you have the enabled) and select Open With Quicktime Player.  This should play the movie directly from the flash drive. 
    If you want to set all .m4v files to open with Quicktime by just double clicking on the file, you can follow the steps here: http://www.tech-recipes.com/rx/2573/os_x_how_to_change_default_application_to_op en_file_type/
    3) If 1. & 2. questions are solvable, will it then be safe to delete the movies from my itunes?
    You can move the TV shows to your flash drive by dragging them from the iTunes window to your flash drive in Finder or the flash drive icon on the desktop.  When you are sure everything is transferred over to your external device, you can delete the movie from iTunes.  I recommend playing the videos from the flash drive first before deleting them in iTunes. 
    To delete the videos from iTunes, you can highlight them and press the delete key on your keyboard.  In the next prompt, you would want to move it to the trash so that it is deleted from your internal hard drive.  
    I hope that helps!

Maybe you are looking for