Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

set .png file in ImageIcon

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.......
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Looky! I'm being abducted by space aliens! Me and this tiny ad!
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic