Setting icon for the JMenuItem

I am trying to set the Icon for the JMenuItem and not able to do so.
I have the Images directory in the classes which has all the images. Is this the way to give the dir path. When do I give '\' and when do I give '/' or'//' or'\\'? Thanks.
I gave
JMenuItem mnuitmFileNew = new JMenuItem(new ImageIcon("Images//new.jpg"));
and later in Jbinit() method I have this.
mnuitmFileNew.setMnemonic('N');
mnuitmFileNew.setText("New");
mnuitmFileNew.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
mnuitmFileNew_actionPerformed(e);
});

Hi,
I'm not sure if you've seen this yet:
http://java.sun.com/docs/books/tutorial/uiswing/components/menu.html
If you still have any questions please post again.
Regards,
Matt
Java Developer Technical Support
Sun Microsystems

Similar Messages

  • Setting icon for the attachment

    Anyone know how to set the icon of the attachment?
    I have no problem sending attachment (in this particular case of *.xls files), but the email I received using NOTES shows a default grey box with the correct file. Tried using NOTES to send Excel attachment, and it showed up with a nice icon indicating Excel file. How can I do the same? Thanks in advance.

    I have had a similar problem and have not been able to determine whether the problem is related to Windows XP Pro, Lotus Notes 5.0.11, or Microsoft Office/OpenOffice. A search of the Internet turned up a number of related issues (attachment icon is missing/invisible, etc).
    The Java program I use to email attached files used to work without any problems, but sometime after I moved to an XP workstation, installed Open Office, and applied XP Service Pack 1, the attachment icons (at least for some file types) became invisible. I can't help suspect that the problem lies in XP or Office, but I have not been able to determine that for sure.
    FWIW: A suggested workaround (from the Lotus Notes forum) is to change your screen display from 32 colors to 16 colors. This has helped make the attachment icons visible when sending mail from Notes, but it has not helped the Java Mail attachments become any less invisible. Maybe the next step would be to go to a monochrome display?

  • 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

  • What settings do I use to back button focus set up for the d5 mark 3? TIA

    5D Mark 3
    Solved!
    Go to Solution.

    When you activate the menu, scroll over (using the dial on the front of the camera) to the orange "C.Fn2: Disp./Operation" menu. (that's the icon of a camera that has a index marks for a light meter below it -- right of the wrench icon, left of the star icon.)
    Each of those menu's on the 5D III have multiple pages.  It's the 2nd page (the 2nd dot from the left) that has the category for "Custom Controls".  Highlight that (using the dial on the back this time) and click the 'set' button.
    That brings up a menu showing each of the major controls on the back of the camera and what they do.  Highlight the icon for the shutter button (this only changes the behavior of a half-press) and change it from "Metering and AF start" to just "Metering start".
    The "AF-ON" button (on the back of your camera) is likely already set to "Metering and AF start" (I believe that's the factory default.)  
    So you're not so much enable back-button focus (which is already probably active)... you're more "disabling" the focus when  the shutter button is pressed half-way.
    Good luck
    Tim Campbell
    5D II, 5D III, 60Da

  • No badge alert on setting icon when the new ios update is released

    Hi all,
    I use iphone 5. I found that a badge is not shown on the setting icon when a new ios update is released. Only way letting me know that there is an update is manual check update, i.e. go to setting->general->software update. I think, normally, the badge should present automatically on the setting icon everytime the update is released. Does anyone find this problem? How to solve this?
    Thanks,

    I have the exact same problem. Been searching Google for answers but have found none :-(
    I upgraded from an iPhone 4s to 5 recently. I had the Settings badge show up right after I got the phone, but after I got home and did a restore from backup to get my 4s stuff over to the 5, then no more badge notification.
    I can't find any settings anywhere to help with this.
    Anybody got any suggestions/thoughts/fixes/etc?

  • 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.

  • HT204053 I have tried to load iCloud onto my Vista opperated pc but do not get a control panel with which to set it up. Each time I use my iTunes id to log into the iCloudI am told that it is an apple id but not set up for the Cloud. How do I get the cont

    I have tried to install iCloud on to my Windows Vista pc. No control panel is present and when I try to login to iCloud using my iTunes id, I am told that it is an Apple id but not set up for the cloud. without the control panel where do I set up my iCloud id?

    You can not setup a new iCloud account using a PC. You must use an Apple device (Mac or iPhone/iPad) to create the account, then sign into it using your PC.

  • What is the factory set password for the administrator for a macbook pro 13" retina display?

    what is the factory set password for the administrator for a macbook pro 13" retina display?

    Welcome to Apple Support Communities
    Macs don't come with a password. You have to set up the password during the initial setup. If you have forgotten your password, follow these steps to reset your password > http://discussions.apple.com/docs/DOC-4101

  • Process open items: how to set defaults for the additional selections

    Hi FI experts,
    Can anyone tell me if it is possible to set defaults for the additional selections in the processing of open items.
    I am using transaction F-04 (or F-06 or F-07) to post with clearing.
    When processing the open items I can use additional selection parameters. In my case I need to use the document type.  I would like to save this selection as a default but this doesn't seem to be possible.
    1. it is not possible to save a variant for the processing of open items
    2. I can not create a variant transaction (with trx. SHD0) for F-0x since this is only possible for dialog transactions
    Do you see another way to store defaults for the additional selections in open item processing?
    Thanks a lot.
    Dimitri

    Hi,
    When you create a transaction variant from FB05, then also you will not able to default the value for additional selections variable.  Hence SHD0 is not going to help.
    As said above, either you can change the additional selection screen parameters, but here again you can't default the value.  You can only reduce the number of entries on the screen.
    Else you can create a custom transaction code by copying the standard.  Even SAP recommends to create custom codes from standard tcode for clearing purposes depending on requirements. 
    Please check this link:
    http://help.sap.com/saphelp_erp60_sp/helpdata/EN/41/37b8e7455b11d182b40000e829fbfe/frameset.htm
    In the above link, in navigation choose clearing -- Specifications for processing open items
    If it is a custom transaction then you can default document number.
    Regards,
    Ravi

  • How to restore icons for the bookmark in osx lion

    The icons for the bookmark have disappeared.  How do I get them back?

    Are you by chance talking about the little icons in the bookmark menus in Firefox?  If so here is the fix from Mozilla:
    If it's something else please be more specific.

  • I have trouble seeing the small icons for the program functions in this tutorial.

    Hello,
    I have my assets from an older site, and want to start a site desktop site in muse. Is there a program ( maybe a book ) that can walk me through this step by step, instead of the Katie's Cafe demo / tutorial?
    The problem with the tutorial is in the dark interface I have trouble seeing the small icons for the program functions.
    I really need to setup a new site as soon as possible, but am not getting there right now.
    Thanks.
    Patricia Goff

    You can download the pdf from here :
    https://helpx.adobe.com/pdf/muse_reference.pdf
    Thanks,
    Sanjit

  • HT204291 I cannot find the AirPlay icon for the life of me. I have iOS 7.0.2 on my iPad Mini. Connected to my WiFi network just fine. I swipe up to get to the control center badges and all I see is the AirDrop icon. Trying to disable mirroring on ipad for

    I cannot find the AirPlay icon for the life of me. I have iOS 7.0.2 on my iPad Mini. Connected to my WiFi network just fine. I swipe up to get to the control center badges and all I see is the AirDrop icon. Trying to disable mirroring on ipad for Netflix streaming and don't know what to do. Any luck out there?

    If you last used an Apple TV to mirror your device and have updated to the newest Apple TV software, go into settings and turn airplay back on. The icon should then appear on your iPad mini when you swipe up allowing you to disable it for Netflix. After updating my Apple TV software for some reason it turned airplay off.
    Bob G

  • 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 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.

  • Icons for the Reports missing in Workspace after applying patches

    Hello Gurus,
    I have installed 11.1.2.2 on one of my VM's and then applied the 11.1.2.2.300 patch on it.
    I have followed the Read Me for all the patches before applying them.
    After applying the patches however the icons for the Reports in workspace
    [IMAGE ON THE FOLLOWING LINK]
    http://i45.tinypic.com/29f6mc0.png
    I have reconfigured web server at the end but that did not help. Any help will be highly appreciated.
    Thanks
    HyperionEPM.

    Hello Nick,
    Yes all the components show green and I can access the reports without any issues. Its just the icon that does not show up.
    I will check the logs you have mentioned to see if there are any exceptions in them.
    But the issues started up after applying the patches for 11.1.2.2.
    I have checked the location path mentioned in Weblogic.xml in raframework.war file and the path points to the correct folder location where the folders mt and mt_thumbnails are located.
    Is the any other way out?
    Should I delete the contents inside the tmp folder located in RAFramework0
    or
    Can reconfigurin Reporting and Analysis framework services help in resolving the issue?
    Please let me know.
    Thanks.
    hyperionEPM

Maybe you are looking for

  • Using External Equipment that is Firewire equipped with MBA

    I have an original MBA. USB port and DV port. But no Firewire. The webcam on this machine is broken, will cost a lot to fix etc. etc. You know, to fix it I need a new screen, half the cost of the MBA etc. etc., and all very sniffy about it at the App

  • Problem With Ultrabeat

    Hello group, So I went to open Ultrabeat in a project (by double-clicking "Ultrabeat" on the I/O slot in the channel strip.) I got the spinning rainbow beachball for about 3 minutes and then a strange Ultrabeat window opened up. Here's a link to what

  • Help me find the right digital camera for my wife for Christmas!

    Hi guys,     I have been scouring Best Buy for days trying to figure out which digital camera to go with.  My wife wants a new one for Christmas, but she doesn't want a traditional point and shoot setup, nor a full DSLR (simply becuase I can't afford

  • Shortest Path Java Code

    Hi I have created a topological network in Oracle Spatial and now I am trying to find the shortest path between two nodes. Is there a sample java code (or instructions) that connects to the database and gets that information? Thank u

  • Runtime modification of Business Rules

    Hi Is there any place when client can modify Business Rules in runtime? I don't want to implement BR in code I want to make them dynamically.