There is no work currently planned along those lines.
If there were it would be JDK10 at the earliest.
The alternative is that you custom render the exact size that is
needed onto a BufferedImage using Graphic2D calls and hand that over.
Granted it is not the same as bundling an SVG resource with your app
but it doesn't depend on any unplanned work.
On 9/22/16, 10:10 AM, Eirik Bakke wrote:
I see there's a lot of work going on to make Swing work well with
HiDPI/Retina displays, including the new MultiResolutionImage API (
It's now up to application developers to provide icons and other image
assets in multiple resolutions. My bet is that many of these newly
designed assets are going to be designed as vector art (e.g. Adobe
Illustrator), which will currently need to be manually rasterized down
to PNG files of the different required resolutions.
Are there any plans or existing RFEs for allowing Swing to load SVG
files from its existing APIs (e.g. "new ImageIcon(URL)")? I searched
the OpenJDK JIRA and JEP 251 but could not find any mention of this. I
think SVG support would make it easier for application developers to
supply icons that look good at all resolutions. SVG support is now
standard in all the big web browsers.
Some existing approaches involving use of the external Batik library
can be seen on