On Wed, 5 Aug 2026 20:07:18 GMT, Phil Race <[email protected]> wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add note and configure via LookAndFeel.installProperty > > src/java.desktop/share/classes/javax/swing/LookAndFeel.java line 278: > >> 276: public static void installProperty(JComponent c, >> 277: String propertyName, Object >> propertyValue) { >> 278: if ("dragEnabled".equals(propertyName) > > Why does this need to be handled specially ? > Why can't it go through c.setUIProperty() like everything else ? > Also the special handling of JPasswordField might be needed here too. > I don't think we want to enable Drag on a JPasswordField, even though I think > it is ignored unless you ALSO call ... > JComponent.putClientProperty("JPasswordField.cutCopyAllowed", Boolean.TRUE); > ... because BasicTextUI.getSourceActions() vetoes the DnD. > > However it seems off to me that we have code that even tries to default > enable drag on a JPasswordField, since even calling setDragEnabled(true) on a > JPasswordField doesn't work. > You still need to set that client property. > I don't know that we need / want to document the client property, but perhaps > somewhere we should document that a L&F should configure JPasswordField to > ignore drags (drops are OK, its just drags). > > Do we in fact already have any API doc about this ?
Yes, it can be done in setUIProperty and I have moved there.. I have also added JPasswordField case in regression test too which passes ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/32101#discussion_r3725482727
