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

Solaris: Static initialization of javax.swing.JTextArea requires an Xserver

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P1 P1
    • 1.4.0
    • 1.4.0
    • client-libs
    • None
    • beta
    • sparc
    • solaris_8

      The focus putback added a hack to JTextArea which allowed the class to load
      its default focus traversal keys with a minimum of code. A new static
      initializer was added that instantiated an AWT TextArea, read its focus travesal
      keys, and cached them for future reference.

      There are two major problems with this code:

      1. On Solaris, instantiating a TextArea opens a connection to the Xserver. The
      nightly build occurs on a headless machine which has no Xserver. Since the
      'images' build target generates javadoc for the Swing components, each Swing
      component must be statically initialized.

      2. This code is not headless-safe. When running with a headless toolkit,
      instantiating a JTextArea should be allowed. However, doing so will generate
      an ExceptionInInitializerError because a TextArea cannot be instantiated by
      a headless toolkit.

            dmendenhsunw David Mendenhall (Inactive)
            dmendenhsunw David Mendenhall (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: