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 121245 - Windows can show off screen if secondary monitor is missing
Summary: Windows can show off screen if secondary monitor is missing
Status: REOPENED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 6.x
Hardware: PC All
: P3 blocker with 1 vote (vote)
Assignee: Stanislav Aubrecht
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-06 04:25 UTC by mclaassen
Modified: 2018-01-26 11:40 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mclaassen 2007-11-06 04:25:01 UTC
At work I have two monitors, the one on my laptop and an external one.  Starting up my laptop at home, without the
external monitor, my extra editing window (which was on the external monitor) is off the screen.  It should have been
opened on my primary monitor, since the secondary one was not available; the standard behavior for this situation.

To work-around the problem, right-click on the task bar item and select "move".  Then press one of the arrow keys and
then move the mouse.  The window will jump to the mouse location.
Comment 1 Peter Pis 2007-11-06 10:39:30 UTC
Reassigning to "core".
Comment 2 Lukas Hasik 2008-02-06 11:32:07 UTC
doesn't it happen for any application that used to be on the "secondary" monitor that isn't available anymore?  

Please, reopen if this is NetBeans specific issue or you disagree.
Comment 3 mclaassen 2008-02-06 14:20:51 UTC
Most other applications, my own included, check to see what the screen bounds are before positioning a window.  MS
Office and Firefox are specific examples of other applications that do this.  Applications that don't can be pretty
frustrating.    

This scenario is becoming more and more common, and most applications made within the past couple of years, handle this
gracefully.

Detecting the case of where a monitor is unplugged during a session is probably not a big deal.  The more common case,
at least for me, is that the secondary monitor is either there or not at startup.  (If I turn on my laptop at home or on
the road, I don't have it.  If I start my laptop at work, I do.)

Some handy methods to help provide the monitor configuration:

GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice[] gs = ge.getScreenDevices();

GraphicsConfiguration config = device.getDefaultConfiguration();
Insets insets = Toolkit.getDefaultToolkit().getScreenInsets(config);
Comment 4 David Simonek 2008-02-29 13:29:07 UTC
Passing to Standa, as he is using dual monitor setup.
Comment 5 Stanislav Aubrecht 2008-03-04 11:30:34 UTC
i wasn't able to reproduce this issue on win xp, jdk 1.5.0_13, nb080303

i think it's a duplicate of #95951

*** This issue has been marked as a duplicate of 95951 ***
Comment 6 charonme 2018-01-26 11:40:00 UTC
confirmed with netbeans 8.2 on win7