You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "mc5-dev (via GitHub)" <gi...@apache.org> on 2025/09/02 09:44:13 UTC

[I] Swing GUI Editor cannot set mnemonic/mnemonics disappearing [netbeans]

mc5-dev opened a new issue, #8780:
URL: https://github.com/apache/netbeans/issues/8780

   ### Apache NetBeans version
   
   Apache NetBeans 27
   
   ### What happened
   
   Editing an existing Swing screen in the GUI editor caused all JButton mnemonics to disappear.  Netbeans stopped generating the code to set them.  The mnemonic values can be still seen in the properties editor, but attempting to change results in a popup saying "Invalid value: s" ('s' is mnemonic trying to set in this eg).  The value then gets blanked out.  Strangely, if you enter 'ss' as value (without the quotes) it accepts it.
   Note that you only see this error if you attempt to edit the mnemonic field, but any other edits in GUI editor still cause all the mnemonics to disappear, without any error displayed.
   
   ### Language / Project Type / NetBeans Component
   
   Java Maven, Swing
   
   ### How to reproduce
   
   Create a brand new Java Maven project.
   Add a new JPanel Form
   In GUI editor, from the Pallet->Swing Controls, click on "Button" and place anywhere on panel.
   In the Properties panel, enter a single letter Eg s, and tab out of field
   Popup error is displayed.
   
   ### Did this work correctly in an earlier version?
   
   Apache NetBeans 24 or earlier
   
   ### Operating System
   
   Windows 11
   
   ### JDK
   
   JDK 21
   
   ### Apache NetBeans packaging
   
   Apache NetBeans binary zip
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   No


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] Swing GUI Editor cannot set mnemonic/mnemonics disappearing [netbeans]

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien closed issue #8780: Swing GUI Editor cannot set mnemonic/mnemonics disappearing
URL: https://github.com/apache/netbeans/issues/8780


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] Swing GUI Editor cannot set mnemonic/mnemonics disappearing [netbeans]

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on issue #8780:
URL: https://github.com/apache/netbeans/issues/8780#issuecomment-3251314176

   here a dev-build zip: https://github.com/apache/netbeans/actions/runs/17450148807/artifacts/3922512507
   
   would be great if someone could verify that this is working as expected again


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] Swing GUI Editor cannot set mnemonic/mnemonics disappearing [netbeans]

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on issue #8780:
URL: https://github.com/apache/netbeans/issues/8780#issuecomment-3257062612

   @pedro-w Thanks for verifying!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] Swing GUI Editor cannot set mnemonic/mnemonics disappearing [netbeans]

Posted by "pedro-w (via GitHub)" <gi...@apache.org>.
pedro-w commented on issue #8780:
URL: https://github.com/apache/netbeans/issues/8780#issuecomment-3249141936

   I found this, which I don't think makes sense.
   
   https://github.com/apache/netbeans/blob/304cbece6f1bab9445184087a42e4cc2f0f9b71d/java/form/src/org/netbeans/modules/form/editors/MnemonicEditor.java#L127-L147
   
   `newValue` is a Character here (this function is called by `setAsText` in the same file) and although the new value is set, control then passes through to line 146 which throws an exception. 
   
   That exception ultimately causes the "Invalid value:" via this helper function
   
   https://github.com/apache/netbeans/blob/304cbece6f1bab9445184087a42e4cc2f0f9b71d/platform/openide.explorer/src/org/openide/explorer/propertysheet/PropUtils.java#L560-L589
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] Swing GUI Editor cannot set mnemonic/mnemonics disappearing [netbeans]

Posted by "pedro-w (via GitHub)" <gi...@apache.org>.
pedro-w commented on issue #8780:
URL: https://github.com/apache/netbeans/issues/8780#issuecomment-3249181162

   I believe some 'return's were accidentally omitted in a recent edit (April 2025)
   
   https://github.com/apache/netbeans/blob/3ebd6cb396842f212bd09011d689941884dd649d/java/form/src/org/netbeans/modules/form/editors/MnemonicEditor.java#L134-L152
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] Swing GUI Editor cannot set mnemonic/mnemonics disappearing [netbeans]

Posted by "pedro-w (via GitHub)" <gi...@apache.org>.
pedro-w commented on issue #8780:
URL: https://github.com/apache/netbeans/issues/8780#issuecomment-3253884336

   I tried it and AFAICs it worked as expected.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] Swing GUI Editor cannot set mnemonic/mnemonics disappearing [netbeans]

Posted by "pedro-w (via GitHub)" <gi...@apache.org>.
pedro-w commented on issue #8780:
URL: https://github.com/apache/netbeans/issues/8780#issuecomment-3249020522

   I can confirm this. Seems like you can set the mnemonic to any (within reason!) string of length > 1 in the properties pane and the mnemonic will be set to its first character. e.g. `soup` -> `s`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] Swing GUI Editor cannot set mnemonic/mnemonics disappearing [netbeans]

Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net commented on issue #8780:
URL: https://github.com/apache/netbeans/issues/8780#issuecomment-3249270842

   Good call.  Looks like this broke in #8385 - @mbien ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] Swing GUI Editor cannot set mnemonic/mnemonics disappearing [netbeans]

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on issue #8780:
URL: https://github.com/apache/netbeans/issues/8780#issuecomment-3250482301

   my mistake, sorry. Will open a PR later.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists