The new AWT classes in JDK 1.2 provide hooks for multiple screens via an
array of screen GraphicsDevice objects. It is not currently possible,
however, to create a Frame on a screen other than the default screen.
The following code will produce a list of all screens on the system:
GraphicsDevice allGraphicsDevices =
However, there is no means to create a Frame using one of these
GraphicsDevices. One of the following (or an equivalent mechanism)
1. A Frame constructor that takes a GraphicsDevice argument
2. A GraphicsDevice method to create a Frame
3. GraphicsEnvironment method to change the default screen
to the specified GraphicsDevice
We believe that the first choice is the preferred one. We propose that
the following four new constructors be added. Two in Frame and two in JFrame.
public Frame(String title, GraphicsDevice graphicsDevice);
public Frame(GraphicsDevice graphicsDevice);
public JFrame(String title, GraphicsDevice graphicsDevice);
public JFrame(GraphicsDevice graphicsDevice);
Additionally, there should be a new method, probably in Window, that
returns the Graphics device on which that Window was created.
public GraphicsDevice getGraphicsDevice();
Since there is a JWindow() constructor without any arguments, that is, one
that doesn't take another JFrame or JWindow, there should also be a
corresponding JWindow constructor that takes a GraphicsDevice:
public JWindow(GraphicsDevice graphicsDevice);