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

Windows with JLF-provided decorations are too small with Java Web Start

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 5.0
    • 5.0
    • client-libs
    • None
    • b57
    • generic
    • windows_xp

      In 1.4, the windows of tutorial examples tended to be a bit too tall when
      run using Java Web Start. The result was sometimes a bit ugly, but they were
      usable.

      In 1.5 (beta 1 & beta 2), the windows are too short! This is very noticeable
      in every example I've tried and makes some of them (for example, HelloWorldJWS)
      unusable unless you enlarge the window.

      This problem seems to occur when both of the following are true:

      1. You're running the app using Java Web Start (presumably the warning
         displayed at the bottom of the window is a factor).

      2. You're using look-and-feel-provided window decorations
         (JFrame.setDefaultLookAndFeelDecorated(true)).

      Both of these are true for almost every Swing tutorial example,
      so they all look buggy.

      The cause seems to be pack() not allocating enough space, but I
      can't tell whether it's the warning or the title bar that's not
      being taken into account.

      Two of the many examples that show this problem:

      http://java.sun.com/docs/books/tutorialJWS/uiswing/14start/example-1dot4/HelloJWS.jnlp

      http://java.sun.com/docs/books/tutorialJWS/uiswing/components/example-1dot4/PasswordDemo.jnlp

      ----------------------
      You can find the source code to these examples here:
      http://java.sun.com/docs/books/tutorial/uiswing/14start/example-1dot4/HelloJWS.java
      http://java.sun.com/docs/books/tutorial/uiswing/components/example-1dot4/PasswordDemo.java

      In general, you can find the source code for all the up-to-date tutorial
      examples by going to this page and clicking the 1.4 links:

      http://java.sun.com/docs/books/tutorial/uiswing/examples.html

      ###@###.### 2004-06-11

            dmikhalksunw Denis Mikhalkin (Inactive)
            kwalrathsunw Kathy Walrath (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: