Results 1 to 3 of 3
  1. #1
    nds
    nds is offline Member
    Join Date
    Feb 2010
    Posts
    3
    Rep Power
    0

    Question ImageIcon's not displayed when created a executable Jar.

    I have created a Java Swing application with an Icon Image and executed in Eclipse it's showing Icon Image but when I exported this application as a Runnable JAR then application is working fine but Icon Image is not displayed.
    I am struggling ... could you please let me know the problem?

    Regards...

  2. #2
    eRaaaa is offline Senior Member
    Join Date
    Oct 2010
    Location
    Germany
    Posts
    787
    Rep Power
    6

    Default

    how do you load the icon?
    See the example on How to Use Icons (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Swing Components)
    You have to use getClass().getResource(...)

  3. #3
    nds
    nds is offline Member
    Join Date
    Feb 2010
    Posts
    3
    Rep Power
    0

    Default

    I was creating it from a file by directly including the same file.
    now its done. thanks for your help.

Similar Threads

  1. images not displayed by netbeans
    By R_Upadhyay in forum NetBeans
    Replies: 1
    Last Post: 02-11-2010, 09:04 AM
  2. ImageIcon : Image not displayed
    By niteshwar.bhardwaj in forum Java 2D
    Replies: 0
    Last Post: 02-13-2009, 08:36 AM
  3. Nodes displayed in JTree
    By Orange in forum AWT / Swing
    Replies: 6
    Last Post: 08-08-2008, 06:07 AM
  4. Tooltip not getting displayed...
    By Preethi in forum New To Java
    Replies: 4
    Last Post: 07-31-2008, 11:00 AM
  5. displayed the rownumbers
    By geeta_ravikanti in forum JDBC
    Replies: 1
    Last Post: 04-22-2008, 03:30 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •