• Post Reply Bookmark Topic Watch Topic
  • New Topic

set .png file in ImageIcon  RSS feed

 
Sumeet Gaikwad
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am using JLabel like

JLabel myLabel = new JLabel(labelText, new ImageIcon("images/myimage.png"), JLabel.CENTER);

When I am using JDK 1.3.1 it works fine.
But for the compatability in Mac OS 9, I am using JDK 1.1.8. Jlabel is displaying but .png image is not displaying??
Can anyone help me to display the .png image using JDK1.1.8???
Plz comment.......
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmmm... I was about to suggest the Java Advanced Imaging API, but it only works in Java 2. ( And I'm assuming that's also what you are currently using... I don't recall 1.3 supporting .png images "out of the box". )

But, there is a PNG decoder put out by SixLegs that says it works under Java 1.1. Try it out!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!