• Post Reply Bookmark Topic Watch Topic
  • New Topic

Displaying Images Using HTML  RSS feed

 
Art Du
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Basically what I'm doing is that I want to show images in JLabels using HTML in the Text Property.

so the Text Property of JLabel1 reads: <HTML><img src=test.png>

but it doesn't seem to work, I've tried "./test.png" and "C:\.....\test.png" (absolute path) and so far everything's failed, it just shows up as a red "X".

I have noticed that it works with URLs, for example <HTML><img src=https://ssl.gstatic.com/sites/p/b46d27/system/app/images/logo/logo.gif>

displays just fine.

Does anyone know how to resolve this?

Sorry just before people go on telling me alternative solutions - I know there are image objects and other ways to squeeze an image into a Label, but this is specifically requested by my co-worker...since we're using this other Java module that will replace the text property later (we do not have access to other property members...and this module is developed by another team).



your suggestions are greatly appreciated!!!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!