predi opened a new issue, #8771:
URL: https://github.com/apache/netbeans/issues/8771

   ### Apache NetBeans version
   
   Apache NetBeans 27
   
   ### What happened
   
   Upon changes with Matisse that cause Swing GUI code regenerating, 
`*.setFloatable(false)` lines get removed for all JToolBar instances, if 
present previously for the edited form.  New instances added via Matisse never 
get the line generated.
   
   This bean property is `true` [by 
default](https://github.com/openjdk/jdk/blame/master/src/java.desktop/share/classes/javax/swing/JToolBar.java#L365)
 in the JDK. Yet Matisse treats it as if the default were `false`, evident by 
the way it is displayed in Netbeans. Immediately after adding a new JToolBar to 
a container component via Matisse, there's no bold text for "floatable" in 
Properties tab/table for it and the associated checkbox is unchecked.
   
   <img width="403" height="340" alt="Image" 
src="https://github.com/user-attachments/assets/cadb210f-606c-497e-b05c-5bfb578e462f";
 />
   
   This means the user cannot set this property to `false` via the above 
checkbox for the code generator to pick up.
   
   The expected behavior is: immediately after adding a JToolBar component to a 
container component via Matisse, the "floatable" property is indeed set to 
`false` (unchecked checkbox), but appears with the bold text in the Properties 
tab/table and is also treated accordingly by the generator.
   
   <img width="403" height="340" alt="Image" 
src="https://github.com/user-attachments/assets/0d614010-c50f-441c-835c-1fa66efe7b42";
 />
   
   This is what this functionality worked as in older NB versions before this 
issue being introduced. I do not know when this happened, but we currently have 
classes that were generated in two different ways, since some were not touched 
in a while. All generated `.form` XML files (for JFrames) start with `<Form 
version="1.5" maxVersion="1.7"` so there's no way to differentiate based on 
these versions.
   
   ### Language / Project Type / NetBeans Component
   
   Java with ANT, Java Application, Matisse
   
   ### How to reproduce
   
   1. Use "File > New Project... > Java with Ant > Java Application" to create 
a new project. Leave all fields as they are offered by default.
   2. Under Projects tab, right-click the only java package entry 
("javaapplication1") and choose "New > JFrame Form...", leave defaults and 
confirm.
   3. Switch to Design mode for the newly created JFrame ("NewJFrame").
   4. Under Navigator tab for NewJFrame, right-click `[JFrame]` tree node, then 
"Add From Palette > Swing Containers > Tool Bar".
   5. Select the newly added JToolBar and observe set properties under 
Properties tab/table.
   
   Example project (ignore creation timestamps, the VM's system time was not 
synced):
   
[JavaApplication1.zip](https://github.com/user-attachments/files/22023818/JavaApplication1.zip)
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   Windows 10 and 11
   
   ### JDK
   
   The one bundled with Windows NB installers
   
   ### Apache NetBeans packaging
   
   FoAN provided installer
   
   ### Anything else
   
   Always reproducible. I tested in a Windows 10 22H2 virtual machine with a 
freshly installed [NB 27](https://installers.friendsofapachenetbeans.org/).
   There may be other bean properties that are also affected - did not check.
   
   ### 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-unsubscr...@netbeans.apache.org.apache.org

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


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

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

Reply via email to