You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "faltur (via GitHub)" <gi...@apache.org> on 2024/04/26 17:38:38 UTC

[I] FontEditor of GUI Builder generating incorrect code [netbeans]

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: 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] FontEditor of GUI Builder generating incorrect code [netbeans]

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

   I cannot replicate this.  What are the settings for `Justification` and `Position` in the TitledBorder editor?  Try changing them - what happens?


-- 
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] FontEditor of GUI Builder generating incorrect code [netbeans]

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

   neilcsmith, thanks for your answer. I did not change the properties "Justification" and "Position", they had Default values. Anyway, after testing it again, the problem seems to not occur anymore. I really don't know why! 
   This thread can be closed.
   
   


-- 
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] FontEditor of GUI Builder generating incorrect code [netbeans]

Posted by "faltur (via GitHub)" <gi...@apache.org>.
faltur closed issue #7337: FontEditor of GUI Builder generating incorrect code
URL: https://github.com/apache/netbeans/issues/7337


-- 
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