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 - JTextArea default font set by the GUI builder not same as runtime default font.
Summary: JTextArea default font set by the GUI builder not same as runtime default font.
Status: RESOLVED DUPLICATE of bug 136260
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.0.2
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: issues@guibuilder
Keywords: JDK_8
Depends on:
Reported: 2015-03-20 04:33 UTC by johnqjones
Modified: 2015-04-02 17:18 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:

IDE log (92.49 KB, text/plain)
2015-03-20 04:33 UTC, johnqjones

Note You need to log in before you can comment on or make changes to this bug.
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
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 ***