On Thu, 30 Jul 2026 16:56:22 GMT, Alexander Zvegintsev <[email protected]> 
wrote:

>> Aqua classes for text components enables dragEnabled by default although 
>> setDragEnabled spec cites `"The default value of the dragEnabled property is 
>> false. "` and there is nothing in Aqua L&F that mentions otherwise as to why 
>> the default is overridden.
>> Other L&F dont override the mode and the code is there from macosx port days 
>> so it seems to be an oversight.
>> 
>> The code is deleted.
>> Test is added to check 
>>  - default value is honoured in all installed L&Fs
>>  - explicit application setting of drag mode is preserved on L&F change
>> 
>>  CI testing is ok.
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> test/jdk/javax/swing/text/JTextComponent/TextComponentDragEnabledTest.java 
> line 36:
> 
>> 34: 
>> 35: import javax.swing.JEditorPane;
>> 36: import javax.swing.JPasswordField;
> 
> `JPasswordField` is not currently used, but it could be added to the test, 
> along with `JFormattedTextField`.

Isn't JPasswordField special ? I'd expect it to never allow the password to be 
dragged out.
i.e although it can't stop someone setting dragEnabled to true, it should 
ignore the setting.
But if this test just verifies nothing changes the default setting, that's OK. 
I'd just want to make it clear that it is ignored.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/32101#discussion_r3685590867

Reply via email to