Icons not loading!

Hello....
I'm currently using Netbean 6.1 and I just want to add some GIF files to my program when it builds. I'm using the files as icons for some of the GUI buttons and labels. But when I select clean and build main project or build main project and execute the JAR file outside the IDE, the icons are missing.
I put the image files into my project folder and basically just add this kinda code in.
Icon smile = new ImageIcon("smile.gif");
label2 = new JLabel("Label with text and smiley icon", smile,
SwingConstants.LEFT);
label2.setToolTipText("This is label2");
container.add(label2);
Icon smile = new ImageIcon("smile.gif");
label2 = new JLabel("Label with text and smiley icon", smile, SwingConstants.LEFT);
label2.setToolTipText("This is label2"); container.add(label2);So..I'm wondering if anyone can help me with this....
Thanks in advance.

   java.net.URL imageURL1 = GUIMain3.class.getResource("images/save.png");
        java.net.URL imageURL2 = GUIMain3.class.getResource("images/zoom.png");
        java.net.URL imageURL3 = GUIMain3.class.getResource("images/expr.png");
        java.net.URL imageURL4 = GUIMain3.class.getResource("images/open.png");i figured it out! thanks alot

Similar Messages

  • Sometimes Tray Icon not loaded correctly

    I am trying to make my (html/ajax) website available as a desktop application, (with little enhancements like notifications in the background etc.)  without writing any extra code. Everything works fine except the tray icon. Sometimes the tray icon is not loading correctly.
    Following is the structure of my sample air application.
    1. An html page(page1.html) i am using as my inital window.
    It creates an invisible html window and loads a new page (page2.html) as below.
            var options = new air.NativeWindowInitOptions();
            options.systemChrome = "standard";
            var windowBounds = new air.Rectangle(200,250,300,400);
            newHTMLLoader = air.HTMLLoader.createRootWindow(false, options, false, windowBounds);
            newHTMLLoader.window.mainAppWindow = window;
            newHTMLLoader.load(new air.URLRequest("page2.html"));
    and later redirecting to the website.
    2. I am using this invisible html window to control the application behavior (like sending ajax requests in the background, monitoring network, checking for updates etc.)
    page2.html contains code to load the tray icon for the application.
    Here is javascript the code in page2.html
    function BgWindow(){
            this.init = function(){
                this.loadTrayIcon();
            var iconLoadComplete = function(event){
                air.NativeApplication.nativeApplication.icon.bitmaps = [event.target.content.bitmapData];
            this.loadTrayIcon = function() {
                air.NativeApplication.nativeApplication.autoExit = true;
                var iconLoad = new air.Loader();
                if (air.NativeApplication.supportsSystemTrayIcon) {
                    iconLoad.contentLoaderInfo.addEventListener(air.Event.COMPLETE,iconLoadComplete);
                    iconLoad.load(new air.URLRequest("lmt16.png"));
        window.onload = function(){
            bgWindow = new BgWindow();
            bgWindow.init();       
    But the problem here is, sometimes the icon is loaded correctly but sometimes its not loaded.
    What am I missing here ?
    Any help is appreciated.
    I am attaching the complete application if somebody needs to analyze it.

    Sorry. Your attachment didn't come through. It triggered an error message about a "malformed container violation." Please try to rezip it and try it again.

  • 4.0Beta8 Trusteer Rapport icon not loaded in search bar as it is in Chrome

    I have the banking web app Trusteer Rapport installed on my computer to protect online banking. It does not load onto Firefox 4.0 Beta 8

    Looks like that application isn't compatible with 4.0b8. <br />
    http://www.trusteer.com/supported-platforms
    For Windows Operating Systems, 32-bit and 64-bit (Windows XP, Vista and Windows 7), Rapport supports:
    * Internet Explorer 6,7,8 and 9 beta (Including 64-bit versions)
    * Firefox 3.x
    * '''Firefox 4 Beta 6'''
    * BT Yahoo browser (Only broadband version 3.x)
    * Google Chrome 3.x and above (Not including versions from the Developer Channel)
    BTW, Firefox 4.0b11 was released earlier this week, you should update to it.

  • Safari upgrade: images/icons not loading

    (apologies, I posted this on another thread by mistake)
    Everything went just fine until yesterday. I have no idea why Safari stopped loading images on websites.
    Safari and all of its plugins are up to date.
    Snow Leopard is up to date.
    Things tried so far without any result:
    clear cache
    reset Safari preferences
    check the DNS and manually add the ones for my area (non US)
    I'm on a college campus network right now and I suspect they put some new firewall setting to block sites like facebook and myspace. The odd thing is: photobucket is also all messed up but I can see this page just fine, but if I go tot he main Apple page, I only get the blue question marks for the photos, and nothing at all on the top navigation bar. If I move the cursor over it, I can see in the status bar it gets the links... but I just can't see the bar at all. Blank space...
    This is happening on some sites and not on others, so at first I thought at some java, flash bla bla bla update. but I checked and re-checked... everything is up to date.
    Please, some help would be really appreciated

    Hi,
    *"I have no idea why Safari stopped loading images on websites."*
    Try this... go to Safari / Preferences - Appearance
    Select the button next to: Display images when the page opens.
    If that doesn't help... try Safari maintenance.
    From the Safari Menu Bar, click Safari / Empty Cache. When you are done with that...
    from the Safari Menu Bar, click Safari / Reset Safari. Select the top 5 buttons and click Reset.
    Mac OS: Web Browser Quits Unexpectedly or Stops Responding
    Safari add-ons can cause performance issues or other situations
    Also, if you are running Safari in 64 bit mode, try running in 32-bit mode instead. Right or control click the Safari icon in the Applications folder, then click: Get Info In the Get Info window click the black disclosure triangle next to General so it faces down. Select 32 bit mode. Quit Safari then relaunch.
    If none of the above helps, download and install the 10.6.2 combo update which contains fixes that might help.
    Mac OS X v10.6.2 Combo Update
    Carolyn

  • Icons not loading in the App Store

    Hello,
    if I open a category into the App Store or the Genius list for example, only the first 10-15 apps have the icon on the left correctly loaded, instead if I show other apps by tapping on the bottom of the list the list doesn't show the icons anymore. This happens very frequently but non everytime I load the App Store app, and is obviously very annoying because not only I can not see the icons, but also the screenshot inside the apps' descriptions.

    Yes I also have this issue.
    I included a screenshot

  • Sudden finder freezing. menu icons not loading. slow performance

    Please help. My Powerbook has suddenly started acting strangely. After restarting the menu bar icons take around 5 minutes to load up. The airport cannot pick up any signals. The compiuter has no startup sound. The computer tends to freeze from the finder forcing a hard restart. I would like to re-install the system or run a diagnostic but am overseas without the disks. Have zapped PRAM and fixed privelages, trashed pref files. nothing.
    Hoping I can get someone with some idea? i've run out.
    thanks
    B

    If the machine has always taken 12 minutes to start up, since it came out of the box, then it was and is defective. There's nothing to do in that case but to take it in for service.

  • CS5 Web Premium Icons Not Loading

    I had the CS 5 Web Premium trial installed until I received my hard box copy in the mail. When I did, I uninstalled the entire trial and then installed the program using the disk. I had a bunch of the trial programs (which should be same as original) on my quick launch bar. Now when I reinstalled, anywhere the icon appears (in start menu shortcuts / recent apps and quicklaunch bar), the icon is THERE, but its not the actual icon of the program. It's the generic icon that displays when an icon is not available. I've tried changing settings, etc but I cannot figure out. I really need to figure this out because it's extremely annoying. I'm used to clicking on the blue icon for photoshop.

    Try uninstalling, then use the CS5 Clean script, then re-installing.
    http://www.adobe.com/support/contact/cs5clean.html

  • Icons not loading properly.

    After setting two different icon themes with lxappearance, both are missing certain key icons (folder icon, for example).
    Is there any reason for this?
    edit- I now get gnome icons instead of the missing ones:
    edit2- It seems the proper icons show up in this menu (saving a file in luakit), but not in thunar:
    Last edited by dgz (2013-08-27 19:23:51)

  • I am experiencing wireless connection problem on 4s after ios 8.1 upgrade. The wireless icon appears showing that it's connected but webpages do not load. I have checked my internet connection with other devices and seems to be alright. what to do?

    Hi
    I am experiencing wireless connection problem on 4s after ios 8.1 upgrade. The wireless icon appears showing that it's connected but webpages do not load. I have checked my internet connection with other devices and seems to be alright. what to do?
    I have tried reseting the network settings and forgetting my wireless connection and re-connecting to it. I even backed up my phone on itunes and restored it, factory reseted it. Nothing seems to work.
    Also after my upgrade to ios 8.1 my personal hotspot option under cellular data has disappeared.
    Would you please help me out? I would really appreciate it.

    Hi..
    Restart your router then restart the iPhone to test.
    If that doesn't help, try this support article >   iOS: Troubleshooting Wi-Fi networks and connections

  • My imac was running snow leopard and was upgraded to Mt. Lion. My Microsoft Office for Mac now will not open.  SO since my Office was 2004, I just purchased Office for Mac 2011.  Do I delete the icons before loading Office 2011 OR after I load 2011?

    Upgraded my Imac to Mt. Lion and now the Microsoft Office icons will not open WORD, EXCEL, POWERPOINT, or ENTOURAGE.  I just pruchased on Ebay
    OFFICE 2011 since my old version was 2004.  DO I REMOVE THE OLD ICONS BEFORE LOADING OFFICE 2011 RO AFTER I LOAD IT???
    THANKS, DR PEPPERMINT

    Office 2011 will install in a separate folder. But do not install Office 2011 until you remove Office 2004. It comes with its own uninstalled located in the MS Office folder. Only use the uninstaller to get rid of it. Then install Office 2011.
    Office 2004 and Other Applications Don't Work in Lion/Mountain Lion
    If you have Office 2004 which is a PPC-only suite, it will not work in Lion/Mountain Lion. You need to upgrade to Office 2011 - Mactopia - or you can try the freeware suite, Libre Office, that is functionally similar to Office 2007 for Windows except it works on Lion/Mountain Lion.
    You may want to consider as well:
    These two suites are similar to Libre Office but not as current or as well-supported:
    NeoOffice
    Open Office
    And, then there is Apple's iWork suite:
    Pages - word processing and layout
    Keynote - presentation
    Numbers - spreadsheet
    Each can open and save Office compatible files. They may be purchased separately via the Mac App Store for $19.99 each.
    As for other software, any PPC-based software will not run in Lion or Mountain Lion because Rosetta is no longer part of OS X. You will need to upgrade to Intel versions of the software.
    (Access to the Mac App Store requires Snow Leopard 10.6.6 or higher and an Apple ID.)

  • My phone will not load past the apple icon when trying to turn on. all it has on the screan is apple icon and a blank status bar. whats wrong? and what can i do?

    my phone will not load past the apple icon when trying to turn on. all it has on the screan is apple icon and a blank status bar. whats wrong? and what can i do?

    Hi, Just put phone in the recovery mode and restore to the factory settings. It should work.

  • I'm running iCloud on a Windows 7 PC. Photoes have been autmatically uploaded from my iPhone. However, the "Photoes" ICON does not load, and I receive an error message of a problem. Then the ICON disappears. How can I access my photoes?

    I'm running iCloud on a Windows 7 PC. Photoes have been autmatically uploaded from my iPhone. However, the "Photoes" ICON does not load, and I receive an error message of a problem. Then the ICON disappears. How can I access my photoes?

    Same issue here,  previously did work perfectly

  • My battery icon has disappeared from my menu bar at the top of the screen and the energy saver preferences simply says 'Could not load Energy Saver preference pane'

    My battery icon randomly disappeared a few months ago from my menu bar and i have been unable to make it come back. After researching solutions online it soon became clear that all of the suggestions needed me to go into the energy saver preferences in the setting however the icon for the energy saver preferences is no longer there and whenever i click in the blank space where it used to be, it simply says 'Could not load Energy Saver preference pane'. As a result of this i never know how much battery i have left and so i just have to wait for the machine to die each time
    The mac in question is a 13 inch 2012 macbook air that is running on OS Mavericks at the moment.
    Any ideas on how to get the icon back?
    - I recently discovered by accident that before i actually log into my account on my mac, when i am still on the page that contains the options of guest user etc. at that point the battery icon is displayed in the top right hand corner? Why is it that the icon exists there but not once i have logged it? Thankyou for any advice.

    Nzdmalan the Adobe Creative Cloud application can be found in your Applications folder.  Are you able to access the application itself?  Is your computer managed by an I.T. department?

  • Firefox Home with Search panel does not load/appear. When I click the home icon a message appears that says Firefox is not a valid URL. Never did that before?

    Nothing different from the question. Firefox just does not load. When I place the mouse cursor over the home icon and do not click, a message panel seemingly powered by My Yahoo states "drag the AT&T globe to the left of the home icon in the toolbar and drop it there, then select "yes" from the pop up window and you are done." This was an action I did recently (not today) but don't see what this has to do with Firefox

    Do a malware check with some malware scanning programs.<br />
    You need to scan with all programs because each program detects different malware.<br />
    Make sure that you update each program to get the latest version of their databases before doing a scan.<br />
    <br />
    * http://www.malwarebytes.org/mbam.php - Malwarebytes' Anti-Malware
    * http://www.superantispyware.com/ - SuperAntispyware
    * http://www.microsoft.com/windows/products/winfamily/defender/default.mspx - Windows Defender: Home Page
    * http://www.safer-networking.org/en/index.html - Spybot Search & Destroy
    * http://www.lavasoft.com/products/ad_aware_free.php - Ad-Aware Free
    See also:
    * "Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked

  • Itunes will not load on my ipad. Icon is there. When I open "Music", it shows itunes with no content briefly and then takes me back to home page. What to do?

    itunes will not load on my ipad. Icon is there. When I open "Music", it shows itunes with no content briefly and then takes me back to home page. What to do?

    Quit the app and restart.
    Go to the home screen first by tapping the home button. Double tap the home button and the task bar will appear with all of your recent/open apps displayed at the bottom. Tap and hold down on any app icon until it begins to wiggle. Tap the minus sign in the upper left corner of the app that you want to close. Restart the iPad.
    Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
    Or reset the iPad.
    Reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.

Maybe you are looking for

  • USAGE TRACKING Error in Obiee 11.1.1.6.0

    Hi All, I have configured usage tracking in our Obiee 11.1.1.6.0 version properly using enterprise manager. And, I have also created a a subject area in the repository called "Usage Tracking" where I gave all the details of "DEV_BIPLATFORM" schema in

  • How to filter an email with a "reply to" line in the header?

    In filtering certain junk emails I've noticed the 'From' email address varies but there is a constant email address in another line 'Reply to'. I tried to add a custom tag but 'Reply To' causes an error message. If I could filter the 'Reply To' line

  • Error when adding Spry Tooltip to page with footer library

    I'm using Dreamweaver CS4 and the Spry menu to apply widgets. I was able to create a brand new page, import an image, and apply the Spry Tooltip widget successfully (as well as edit the CSS etc.). But I run into problems when I applied it to an image

  • Is sessionnumber generated in the Hyperion Essbase Server is unque?

    Hi All, Is sessionnumber generated in the Hyperion Essbase Server is unque? how to get the session number in the CBS file? What is the code to get the Session number in Essbase Integration Services Shell? Regards Shakti

  • Mini-player album info stays no matter what, instead of fading.

    For Itunes 11.1.1, when I open the mini-player, it shows the album info on the top and play, pause, skip, etc on the bottom.  It's supposed to show that when I have the mouse hovering over the art. But it shows the info no matter what.  Even after I