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

Checkbox and Radiobutton wrong preferred size

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.2.2
    • client-libs
    • beta
    • x86
    • windows_nt



      Name: skT88420 Date: 01/11/2000


      java version "1.2"
      Classic VM (build JDK-1.2-V, native threads)
      This note applies to JDK 1.1.8 as well.

      1) (Windows platform) Go to "Settings"->"Control Panel"->"Display"->"Appearance tab" Select "Active title Bar".
      Change size to 50 pixels (18 by default, may differ on user display scheme).
      Launch java application and take a look at any Checkbox
      that is added to any container with any of standart layout managers (therefore
      size of components is determined by component's preferred size).
      we can see that size showed is smaller than actual size.(at least 50x50 plus dimension of label).

      2) source code of an example:

      >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
      import java.awt.*;

      public class Test extends Frame {
          public Test() {
              add(new Checkbox("Demo_CheckBox_With_Wrong_PreferredSize_Dimension"));
              pack();
          }
          public static void main(String[] params){
              Test testFrame = new Test();
              testFrame.setVisible(true);
          }
      }
      >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

      3)
      4) Standart configuration except settings made described at " 1) "
      (Review ID: 99220)
      ======================================================================

            prssunw Prs Prs (Inactive)
            skonchad Sandeep Konchady
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: