faltur opened a new issue, #7337:
URL: https://github.com/apache/netbeans/issues/7337
### Apache NetBeans version
Apache NetBeans 21
### What happened
I've just created a new project and added a JFrame, and inside it a Panel.
When I configure the border as TitledBorder and the font properties of the
JPanel's border, the GUI builder generates incorrect code, and the IDE shows
the following error inside the **initComponents()** method:
> incompatible types: <null> cannot be converted to int
The line where the error occurs:
`
jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Name",
null, null, new java.awt.Font("Tahoma", 3, 12)));
`
### Language / Project Type / NetBeans Component
Java with Ant, Java Application
### How to reproduce
New Project -> Java with Ant -> Java Application:
Package: my.contacteditor
In the Design View, I add a JPanel inside a JFrame, and set the border to be
TitledBorder. Then, I set the title border as "Name", the font style as "Bold",
and its size equals "12". After that, I click OK. Now the IDE shows an error in
the code inside the initComponents() method.
### Did this work correctly in an earlier version?
No / Don't know
### Operating System
Windows 7 64-bit
### JDK
JDK 22: Package: jdk-22_windows-x64_bin.exe
### Apache NetBeans packaging
Apache NetBeans binary zip
### Anything else
The problem issue occurs every time.
I've just installed the current version of Netbeans, JRE, and JDK, and I'm
trying to follow the tutorial [Designing a Swing GUI in NetBeans
IDE](https://netbeans.apache.org/tutorial/main/kb/docs/java/quickstart-gui/)
### 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists