I am developing a Swing-based Java application in Eclipse on Windows XP. I have a dual monitor setup.
I want to run the program on a different monitor than the one on which I am running Eclipse. How to configure Debug configuration to make this happen?
When a new frame opens, it defaults to 0,0 coordinates. Exactly where it depends on your operating system monitor. Typically, 0.0 will be the upper left corner of the main monitor.
- Eclipse , () . Eclipse . , . Eclipse .
, , .
, . , "" ( , ).
. , GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds.
GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds
, .
, x < 0 ( , ).
, (setPosition()) . node , .
setPosition()
, API GraphicsEnvironment.getScreenDevices().
GraphicsEnvironment.getScreenDevices()
, . , , - , ( , , VM -). . , , .
RCP RCP.
Perhaps you can achieve this behavior programmatically. I am sure you can search Google and find examples of how to open a window on a second monitor. If this is what you want only during debugging, add the key to the startup configuration (more precisely, the JVM time argument) and check if the switch (System.getProperty) will be there when your program starts.