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.
Summary: | Default font for JList is not correct | ||
---|---|---|---|
Product: | guibuilder | Reporter: | zcotter |
Component: | Code | Assignee: | issues@guibuilder <issues> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | zcotter |
Priority: | P3 | ||
Version: | 7.3 | ||
Hardware: | PC | ||
OS: | Windows 7 x64 | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
zcotter
2012-06-24 21:56:20 UTC
The problem here is that there is a different default font for the Look and Feel used by the IDE and the Look and Feel in which your application runs. In your case it's likely Windows L&F for the IDE and then you run the app without any L&F set, so you get the Metal L&F which uses the bold fonts (but I don't think it is Tahoma). There is indeed the problem in GUI builder that does not allow to "force" setting of a font property even if it is default (because it might not be default in runtime). It's already reported in bug 136260 I think. But it's generally quite rare to set explicit fonts on components, it's not a good practice. In the case you describe it seems to me like you'd actually want to run your app in a different L&F that will use the font you want. For that have look at at code that is provided in main method when you create a new JFrame. It sets the L&F to Nimbus (also not using bold fonts). If you comment out the 'for' cycle and just use: UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); you get the system L&F (Windows L&F in your case) which will make your app look closest to the native applications. NetBeans also uses this L&F. Even in case you want to stay with the Metal L&F you have, it's still unusual to set the full font specification, including the font name. Note that in the font property editor you can specify to just change the font "thickness" to "plain". This will be possible even in the case you describe, and when running the GUI form, it will keep the actual font, just not bold. *** This bug has been marked as a duplicate of bug 136260 *** |