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 218895 - UI dialogue boxes open collapsed
Summary: UI dialogue boxes open collapsed
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: JDK Problems (show other bugs)
Version: 7.2
Hardware: PC Linux
: P2 normal (vote)
Assignee: Stanislav Aubrecht
URL:
Keywords:
: 211885 213852 216274 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-09-24 10:55 UTC by jwh
Modified: 2012-12-03 09:32 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Example of collapsed window (219.57 KB, image/png)
2012-09-24 10:55 UTC, jwh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jwh 2012-09-24 10:55:26 UTC
Created attachment 124796 [details]
Example of collapsed window

As seen in the attached image, any action which involves a dialogue box in Netbeans results in a collapsed window being shown. In order to use it, I have to drag it. On windows with no options (e.g. About Netbeans) I cannot drag the window at all and as a result must kill the IDE
Comment 1 jwh 2012-09-25 07:52:06 UTC
It appears as though the issue only occurs on a dual-screen monitor setup when displayed on the secondary screen. When I move Netbeans over to my primary screen, dialogue boxes are correctly expanded
Comment 2 Stanislav Aubrecht 2012-09-25 12:15:11 UTC
Please provide JDK, OS and NetBeans version info and reopen, thanks.
Comment 3 jwh 2012-09-25 14:53:33 UTC
Product Version: NetBeans IDE 7.2 (Build 201207171143)
Java: 1.7.0_07; Java HotSpot(TM) 64-Bit Server VM 23.3-b01
System: Linux version 3.2.0-31-generic running on amd64; UTF-8; en_GB (nb)
Comment 4 Stanislav Aubrecht 2012-10-01 14:28:12 UTC
This is actually a bug in JDK 7 implementation on Linux. If there's dual screen setup and the bounds of the first display are e.g. 0x0x1024x724 and the bounds of the secondary display are e.g. 1024x0x1024x724 (i.e. the secondary display is positioned to right of the primary one) then java.awt.Toolkit.getScreenInsets() returns left insets of 1024. On MS Windows the left insets are 0.
Because of the wrong insets wrong usable display area has been calculated so some dialog windows use scroll pane to display their content so they have wrong initial size.

I've added a workaround in core-main 298fda94fa08
Comment 5 Stanislav Aubrecht 2012-10-01 14:31:13 UTC
*** Bug 213852 has been marked as a duplicate of this bug. ***
Comment 6 Stanislav Aubrecht 2012-10-01 14:33:15 UTC
*** Bug 216274 has been marked as a duplicate of this bug. ***
Comment 7 Stanislav Aubrecht 2012-10-01 14:33:45 UTC
*** Bug 211885 has been marked as a duplicate of this bug. ***
Comment 8 Quality Engineering 2012-10-03 02:41:03 UTC
Integrated into 'main-golden', will be available in build *201210030002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/298fda94fa08
User: S. Aubrecht <saubrecht@netbeans.org>
Log: #218895 - invalid screen insets in dual screen setup on Linux
Comment 9 Antonin Nebuzelsky 2012-10-03 12:26:17 UTC
Marking fixed in 7.3. Though the JDK bug will be filed anyway.
Comment 10 Antonin Nebuzelsky 2012-10-03 13:26:15 UTC
JDK bug filed internally as JDK-8000360 into the new Jira system.
(https://blogs.oracle.com/darcy/entry/milestone_jira_system_of_record)
Comment 11 Antonin Nebuzelsky 2012-10-04 10:56:42 UTC
Reassigning back to saubrecht for backport to 7.2.1.
Comment 12 Stanislav Aubrecht 2012-10-05 09:10:08 UTC
QA, please verify the fix, thanks.
Comment 13 Tomas Danek 2012-10-05 13:04:27 UTC
I was able to reproduce with older dev builds on Ubuntu w/ dual screen, but I'm not able to reproduce now with latest daily, verified. Please backport.
Comment 14 Stanislav Aubrecht 2012-10-05 14:38:26 UTC
release72 27187e3f83a4
Comment 15 Quality Engineering 2012-10-10 14:16:26 UTC
Integrated into 'releases', will be available in build *201210100934* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/27187e3f83a4
User: S. Aubrecht <saubrecht@netbeans.org>
Log: #218895 - invalid screen insets in dual screen setup on Linux
(transplanted from 298fda94fa080de854fe0368dd792d12bf8c0b93)
Comment 16 everflux 2012-11-30 21:47:24 UTC
I looked up "getScreenInsets" usage across the Netbeans sources. I noticed that there are two "Utilities" classes providing 
 public static Rectangle getUsableScreenBounds(GraphicsConfiguration gconf)

Only one of them got the fix for this issue:
core-main/openide.util/src/org/openide/util/Utilities.java
while the one in
core-main/o.n.swing.tabcontrol/beanstubs/org/openide/util/Utilities.java
didn't.

I am not familar with the module approach of Netbeans, so I can not determine if the redundancy is a good approach. At least both methods should be kept in sync.
Comment 17 Stanislav Aubrecht 2012-12-03 09:32:36 UTC
(In reply to comment #16)
> I looked up "getScreenInsets" usage across the Netbeans sources. I noticed that
> there are two "Utilities" classes providing 
>  public static Rectangle getUsableScreenBounds(GraphicsConfiguration gconf)
> 
> Only one of them got the fix for this issue:
> core-main/openide.util/src/org/openide/util/Utilities.java
> while the one in
> core-main/o.n.swing.tabcontrol/beanstubs/org/openide/util/Utilities.java
> didn't.
The class in tabcontrol module isn't part of NetBeans distribution, it's used only when the module is built as a standalone JAR (to be used in a Swing app).