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 131233

Summary: Omit sun.java2d.noddraw=true for JDK 1.6
Product: installer Reporter: _ gtzabari <gtzabari>
Component: CodeAssignee: Libor Fischmeistr <lfischmeistr>
Status: NEW ---    
Severity: blocker CC: a-nb, av-nb, dsimonek, hanasaki, issues, pbenes, pchytil, saubrecht
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: Screenshot of incorrectly antialised text in NetBeans
Correctly antialised text without the command line argument

Description _ gtzabari 2008-03-26 20:13:07 UTC
dev build 200803250006

Recent dev builds have added -J-Dsun.java2d.noddraw=true to the command-line arguments (as far as I can tell, this is
because of bugs in JDK 1.5) but JDK 1.6 has a much improved pipeline.

I propose that the installer use add -J-Dsun.java2d.noddraw=true to the command-line arguments for JDK 1.5 but omit it
for 1.6 and up. It might also interest you to know that the pipeline is enabled by default as of Java6 Update N because
it's it is considered mature enough.
Comment 1 dlipin 2008-03-27 08:43:05 UTC
I`d like to get the approval and some comments from core team.
And certainly it is not a defect..
Comment 2 Lukas Hasik 2008-03-27 12:05:09 UTC
Dafe, could you comment on the -J-Dsun.java2d.noddraw=true in command line arguments? 
Comment 3 David Simonek 2008-03-27 16:57:03 UTC
Standa knows more about it, ccing him.
Comment 4 Stanislav Aubrecht 2008-03-27 17:16:36 UTC
-Dsun.java2d.noddraw=true wasn't added because of bugs in JDK 1.5. i added that flag (after agreement with our QA) to
enable transparency effects provided by JNA library. see issues #126848 and #128433
Comment 5 _ gtzabari 2008-03-27 17:53:20 UTC
Okay, so three questions:

1) Where does Netbeans use Windows transparency? I haven't seen this anywhere.
2) Does Windows transparency outweigh the performance benefits of the pipeline?
3) What about using the following mechanism? It looks like it will become the standard moving forward and it's available
in JDK6: http://today.java.net/pub/a/today/2008/03/18/translucent-and-shaped-swing-windows.html
Comment 6 Stanislav Aubrecht 2008-03-27 18:11:47 UTC
1) try dragging any editor window or projects/navigator/... view
2) our measurements showed only negligible performance hit
3) nice, but it's not stable api yet and it's available in jdk 1.6 update N only

besides, whoever doesn't like ddraw turned off can simply remove that switch from their config files...
Comment 7 dlipin 2008-03-28 15:37:33 UTC
sorry guys, I am not very experienced in netbeans core, but can we do the following in the core itself :
if(System.getProperty("java.version").startsWith("1.5") && System.getProperty("sun.java2d.noddraw")!=null) {
    System.setProperty("sun.java2d.noddraw","true");
}

Will it have any effect?
Comment 8 Stanislav Aubrecht 2008-03-28 17:03:35 UTC
> sorry guys, I am not very experienced in netbeans core, but can we do the following in the core itself :
> if(System.getProperty("java.version").startsWith("1.5") && System.getProperty("sun.java2d.noddraw")!=null) {
>    System.setProperty("sun.java2d.noddraw","true");
> }
> 
> Will it have any effect?

that's too late. if the switch isn't specified at command line then there are some repaint issues after setting it at
runtime
Comment 9 Alexei Mokeev 2008-10-29 16:02:22 UTC
Sorry, can it be worked out inside the netbeans executable somehow ?
IMO installer should not switch flags during installation since actual execution of IDE might be under different JDK.
Comment 10 pbenes 2008-11-27 15:53:27 UTC
I have just found out the this setting causes problem with text antialiasing. I am using Scenario graphics library to
render graphic content in NetBeans and when JDK 1.6 u10 (and newer) is used it produces ugly black dots around the text
labels (see the attached screenshot). The problem is probably not in NetBeans itself, but moving this setting into the
NetBeans launcher (where current JDK version is already known) would solve my problem and also improve performance a
bit. In case you have access to our JIRA, here is the link to our issue. Thanks
Comment 11 pbenes 2008-11-27 15:55:14 UTC
Created attachment 74245 [details]
Screenshot of incorrectly antialised text in NetBeans
Comment 12 dlipin 2008-11-27 15:57:06 UTC
Pavel,
could you please also attach screenshot without this setting?

Thanks,
Dmitry
Comment 13 pbenes 2008-11-27 16:37:09 UTC
Here is the JIRA link I have mentioned in my previous comment: http://openjfx.java.sun.com/jira/browse/RT-2336
Comment 14 pbenes 2008-11-27 16:42:10 UTC
Created attachment 74249 [details]
Correctly antialised text without the command line argument
Comment 15 _ gtzabari 2008-11-27 16:54:20 UTC
Your last attachment is in text/plain instead of image/png. It won't display properly.
Comment 16 pbenes 2008-11-27 16:59:19 UTC
I am sorry, my mistake. Just save it and open it locally. It will work.
Comment 17 russelldavis 2011-02-12 23:05:36 UTC
There's another reason this parameter should be omitted. NetBeans performance in a Windows Remote Desktop session is *horrible* when sun.java2d.noddraw is set to true. When I run with a command line of -J-Dsun.java2d.noddraw=false, performance becomes reasonable again.

I would argue that due to the impact on performance, this should be reclassified as a defect.

Thanks!
Comment 18 _ gtzabari 2011-02-12 23:53:06 UTC
On a side-note, I've long argued that the current tab/window dragging mechanism in Netbeans is terrible. The FireFox mechanism for moving tabs (with a small arrow to indicate the drop location) looks much better and runs much faster over Remote Desktop.

Please review the usability of tab dragging and dump the use of transparent windows if possible. Transparency normally looks great, but in this case it just looks out of place.
Comment 19 Stanislav Aubrecht 2011-02-14 11:09:58 UTC
(In reply to comment #18)
> On a side-note, I've long argued that the current tab/window dragging mechanism
> in Netbeans is terrible. The FireFox mechanism for moving tabs (with a small
> arrow to indicate the drop location) looks much better and runs much faster
> over Remote Desktop.
> 
> Please review the usability of tab dragging and dump the use of transparent
> windows if possible. Transparency normally looks great, but in this case it
> just looks out of place.

my firefox (3.6.13 on win 7) does show a semi-transparent preview of the window being dragged - just like in netbeans:)

you can turn the transparency off in netbeans options.
Comment 20 Jiri Rechtacek 2012-10-07 12:58:39 UTC
Assigned to new owner.
Comment 21 _ gtzabari 2016-03-09 16:50:01 UTC
Can one of the committers confirm whether this issue fixed?