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 236403 - Javadoc popup is poorly rendered
Summary: Javadoc popup is poorly rendered
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P3 normal with 7 votes (vote)
Assignee: Dusan Balek
: 237704 (view as bug list)
Depends on:
Reported: 2013-09-26 07:36 UTC by Marian Petras
Modified: 2018-02-17 18:40 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:

screenshot (61.32 KB, image/png)
2013-09-26 07:37 UTC, Marian Petras
Another example (Compare Windows LAF with Apple LAF) (396.61 KB, image/png)
2014-10-12 10:05 UTC, markiewb
Proposed patch (2.95 KB, patch)
2017-11-03 16:30 UTC, ebakke
Details | Diff
Screenshot before and after the proposed patch (365.49 KB, image/png)
2017-11-03 16:31 UTC, ebakke

Note You need to log in before you can comment on or make changes to this bug.
Description Marian Petras 2013-09-26 07:36:00 UTC
While Javadoc in the "Javadoc window" is rendered correctly, Javadoc for the same class member is rendered poorly in the editor's Javadoc pop-up:

- parts of package name are separated with spaces
- it is all rendered with monospaced font
- it is narrow (without reason)

In addition, the following bug is common to the Javadoc window and Javadoc pop-up:

- monospace/code parts of the Javadoc are rendered in much smaller font than the rest

See the attached screenshot.

Product Version: NetBeans IDE 7.4 RC1 (Build 201309162201)
Java: 1.7.0_40; Java HotSpot(TM) 64-Bit Server VM 24.0-b56
Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b43
System: Windows 7 version 6.1 running on amd64; Cp1250; cs_CZ (nb)
Comment 1 Marian Petras 2013-09-26 07:37:29 UTC
Created attachment 140492 [details]
Comment 2 pns 2013-10-17 15:34:04 UTC
This is still present in the released version.

Product Version: NetBeans IDE 7.4 (Build 201310111528)
Java: 1.7.0_40; Java HotSpot(TM) 64-Bit Server VM 24.0-b56
Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b43
System: Windows 7 version 6.1 running on amd64; Cp1252; en_GB (nb)
Comment 3 ebakke 2013-10-19 05:31:29 UTC
Just downloaded 7.4 and can confirm that I'm also observing the "all monospace" javadoc popup rendering problem. It didn't use to be this way (I think 7.3 didn't have this problem, though I can't remember.) It makes the Javadoc harder to read--I'd love to see a fix, too.
Comment 4 Jiri Prox 2013-10-30 14:13:02 UTC
*** Bug 237704 has been marked as a duplicate of this bug. ***
Comment 5 iluvtr 2014-07-14 18:39:41 UTC
Some progress on the fix of this bug?
Comment 6 iluvtr 2014-07-14 18:40:51 UTC
I really wish that you've left things like it was in NB 7.2. Why change style and bother users?
Comment 7 ebakke 2014-07-14 19:19:53 UTC
Still observing this on NetBeans IDE 8.0.
Comment 8 markiewb 2014-10-12 10:05:35 UTC
Created attachment 149851 [details]
Another example (Compare Windows LAF with Apple LAF)
Comment 9 markiewb 2014-10-12 11:27:52 UTC
This regression seems to relate to the changes made in

BUT I could not figure out how to fix it myself. 
I also wonder why it works in the JavaDoc Top Component and in the Navigator JavaDoc popup.
Comment 10 iluvtr 2014-11-27 12:35:25 UTC
This bug stills in 8.0.1
Comment 11 Jiri Prox 2014-11-27 13:13:27 UTC
Please, do not change the version value, it is the version where was the problem reported at first
Comment 12 Martin Balin 2016-07-07 07:17:40 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss
Comment 13 ebakke 2016-07-07 17:29:39 UTC
The problem of Javadoc being rendered in all-monospace in the popup still remains in the latest build. Would love to see this fixed. It did not use to be this way in earlier NetBeans versions (7.3 or maybe earlier?).

Product Version: NetBeans IDE Dev (Build 201607070002)
Java: 1.8.0_92; Java HotSpot(TM) 64-Bit Server VM 25.92-b14
Runtime: Java(TM) SE Runtime Environment 1.8.0_92-b14
System: Mac OS X version 10.9.5 running on x86_64; UTF-8; en_US (nb)
Comment 14 ebakke 2017-11-03 16:30:41 UTC
Created attachment 165397 [details]
Proposed patch

Here's a patch. This fixes both the all-monospace-Javadoc problem and the text size problem. See attached screenshots in a subsequent comment.

The all-monospaced-Javadoc bug was introduced while trying to make the text larger in . According to a comment in o.n.modules.editor.completion.HTMLDocView.setBodyFontInCSS, the old code attempts to "not use monospaced font, just adjust fontsize", but this fails because, after the patch for #233151, setFont is called with a monospace font earlier, and the stylesheet is then set based on the font face from getFont().

The first part of the solution is to fix setBodyFontInCSS so that the font face is preserved again. The second part is to take the editor's text zoom settings into account when HTMLDocView is opened in the context of an editor window; this is done in o.n.modules.editor.completion.DocumentationScrollPane.

When HTMLDocView is used in other contexts, e.g. in the Navigator, there is no zoom setting to apply (zoom settings are per-editor), but arguably in these cases it is correct to use the same text size as the rest of the UI.
Comment 15 ebakke 2017-11-03 16:31:51 UTC
Created attachment 165398 [details]
Screenshot before and after the proposed patch

Screenshot of the Javadoc popup before and after the proposed patch, at two different editor zoom levels.
Comment 16 ebakke 2018-02-17 18:40:52 UTC
Created an issue for this bug in the new Apache NetBeans JIRA: