On Mon, 16 Jun 2025 15:21:33 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:

>> Prasanta Sadhukhan has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Fix for constructor
>
> src/java.desktop/share/classes/javax/swing/ImageIcon.java line 373:
> 
>> 371:     /**
>> 372:      * Sets the image displayed by this icon.
>> 373:      * Setting null image will not render any image icon.
> 
> Suggestion:
> 
>      * Setting a {@code null} image will not render any image icon.
> 
> 
> Will it sound clearer if the text stated, _“Setting a `{@code null}` image 
> will remove the icon?”_

I didnt use "remove the icon" as there are 2 possibilities. 
- Already there is existing ImageIcon with image set so if now 
ImageIcon.setImage(null) is called, it will remove the existing icon and 
thereafter will not render any image icon
- If there is no ImageIcon set, calling ImageIcon.setImage(null) will not 
render any image icon so no question of removing the icon
so in both possibilities, there is no imageicon rendered for null image so I 
chose that phrase.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25767#discussion_r2151212528

Reply via email to