|
Quick Lists
|
|
Bug ID:
|
4131642
|
|
Votes
|
6
|
|
Synopsis
|
Need ability to create a Frame on a screen other than the default screen
|
|
Category
|
java:classes_2d
|
|
Reported Against
|
1.2
, 1.2beta3
|
|
Release Fixed
|
1.3(kestrel-beta)
|
|
State
|
10-Fix Delivered,
request for enhancement
|
|
Priority:
|
4-Low
|
|
Related Bugs
|
4189326
,
4261172
,
4356756
|
|
Submit Date
|
22-APR-1998
|
|
Description
|
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[] =
GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices();
However, there is no means to create a Frame using one of these
GraphicsDevices. One of the following (or an equivalent mechanism)
is needed:
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();
[ xxxxx@xxxxx 1999- customer -18]
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);
|
|
Work Around
|
N/A
|
|
Evaluation
|
I think we should add a method to Component to return its graphics
configuration instead of a method on Frame to return its device. You
can get from a Config to the Device so that solves a larger problem
instead.
Also, I think it would be better if Frame took a GraphicsConfig (which
implies a Device) instead of a device object. With the suggested fixes,
there is still no way to control the Config of a Frame on a screen that
has multiple available configurations.
xxxxx@xxxxx 1999-02-18
|
|
Comments
|
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|
|
|
 |