JLabel does not render image in HTML tags

Bug #1831908 reported by Douglas Miller
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openjdk-8 (Ubuntu)
New
Undecided
Unassigned

Bug Description

The example program creates a JLabel with text set to "<HTML><IMG SRC='file://path/some-file.png'></HTML>". On previous versions of the openjdk-8-jre, this would work and the PNG was displayed in the JLabel. On the current version, 8u212-b03-0ubuntu1.18.04.1, all that is rendered is a tiny label with no apparent image inside. I have run the same class file on a RHEL 7 system with JRE 1.8.0_201, and on the original 18.04 JRE 1.8.0_162 and it works as expected. I believe this also worked correctly on 8u191-b12-2ubuntu0.18.04.1.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: openjdk-8-jre 8u212-b03-0ubuntu1.18.04.1
ProcVersionSignature: Ubuntu 4.15.0-50.54-generic 4.15.18
Uname: Linux 4.15.0-50-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.6
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Thu Jun 6 09:21:54 2019
InstallationDate: Installed on 2017-02-22 (834 days ago)
InstallationMedia: Ubuntu 16.04.2 LTS "Xenial Xerus" - Release amd64 (20170215.2)
ProcEnviron:
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: openjdk-8
UpgradeStatus: Upgraded to bionic on 2018-09-09 (269 days ago)

Revision history for this message
Douglas Miller (durgadas311) wrote :
Revision history for this message
Douglas Miller (durgadas311) wrote :

The results screenshot test-java1.8.0_212.png shows how it fails to render the image. test-java1.8.0_162.png shows success on the original 18.04 version of the JRE. Note, in all cases if I specify an image file that does not exist, all version properly render a JLabel of appropriate size. So, it would seems that the bug exists after the image file is successfully loaded.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.