RFR: 8236987: Remove call to System.out.println from ImageIcon.loadImage

Tejesh R duke at openjdk.java.net
Tue Mar 15 13:33:48 UTC 2022


On Tue, 15 Mar 2022 12:00:33 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> For url image I'm getting "ERRORED" as output......
>
> A small file from local storage loads fast enough. By the time you get to read status, load could complete.
> 
> For the url, do you use the same URL? If the connection can be established, it should load pretty fast too. However, if you need a proxy server to access the Internet but you won't provide one, it won't load as fast, nor will it report error fast enough.
> 
> Anyway, my example above confirms *it's possible the status remains `LOADING`*. But the image isn't loading, it will never load and its status will never change, so you have to amend the status to a correct one.

@aivanov-jdk , U r right, the status remains LOADING for url...... I was getting "ERRORED" because I was showing a message using `JOptionPane.showMessageDialog(null, "");` before setting ImageIcon.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7754



More information about the client-libs-dev mailing list