This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 251310

Summary: JTextArea default font set by the GUI builder not same as runtime default font.
Product: guibuilder Reporter: johnqjones
Component: CodeAssignee: issues@guibuilder <issues>
Status: RESOLVED DUPLICATE    
Severity: normal Keywords: JDK_8
Priority: P3    
Version: 8.0.2   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:
Attachments: IDE log

Description johnqjones 2015-03-20 04:33:01 UTC
Product Version = NetBeans IDE 8.0.2 (Build 201411181905)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.8.0_11
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.11-b03

When using the GUI builder to create a JTextArea, the default font (re: Properties) is Monospaced, 13.  However, the runtime default font is Display, 12.  So, when building a Text Area using the default font, the graphical image built does not look the same as the run-time image.  Furthermore, if you go into Properties and set the font manually to Monospaced 13, it assumes you are using the default so the runtime font used is Display, 12.  It appears the only way to get a runtime font of Monospaced 13 is to write a setFont statement to execute when running the program.  I expect this problem may exist for other text type containers.
Comment 1 johnqjones 2015-03-20 04:33:05 UTC
Created attachment 152735 [details]
IDE log
Comment 2 johnqjones 2015-03-20 04:35:34 UTC
I have no idea how to use this form, but you can reach me for questions/comments at johnvvjones@zipcon.net
Comment 3 Tomas Pavek 2015-04-02 17:18:45 UTC
This depends on Look and Feel in which you run your application. It is much likely not the system (i.e. Windows in your case) L&F on which runs your IDE (and so the GUI builder). Each Look and Feel has different fonts. See also bug 214676.

*** This bug has been marked as a duplicate of bug 136260 ***