On Wed, 12 Aug 2026 05:16:29 GMT, Prasanta Sadhukhan <[email protected]>
wrote:
>> src/java.desktop/share/classes/javax/swing/JComponent.java line 4200:
>>
>>> 4198: var accessor = SwingAccessor.getJTextComponentAccessor();
>>> 4199: if (!accessor.isDragEnabledSet(textComponent)) {
>>> 4200: accessor.setDragEnabledUIResource(textComponent,
>>
>> This line may cause undocumented headless exception in public
>> LookAndFeel.installProperty() method?
>
> Aqua already prevents it
>
> if (!GraphicsEnvironment.isHeadless()) {
> LookAndFeel.installProperty(component, "dragEnabled", true);
> }
>
> and BasicTextUI installs false, so it cannot throw so there will not be any
> headless exception
The "LookAndFeel.installProperty()" is a public method, just call it directly
and pass true value to trigger an exception.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/32101#discussion_r3763829591