Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4131642

Need ability to create a Frame on a screen other than the default screen

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.3.0
    • 1.2.0
    • client-libs
    • 2d
    • beta
    • generic, sparc
    • generic, solaris_2.6

      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();


      [kevin.rushforth@Eng 1999-02-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);

            tnguyensunw Thanh Nguyen (Inactive)
            kcr Kevin Rushforth
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: