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

JCK1.4, interactive: api/java_swing/interactive/JRadioButtonTests.html#JRadioBut

XMLWordPrintable

    • x86
    • linux, windows_2000



      Name: asR10013 Date: 04/30/2002


      Filed By : J2SE-SQA [###@###.###
      JDK : jdk1.4.1-b10, jdk1.4.0
      JCK : jck1.4-b17
      Platform[s] : RH Linux 7.2, Windows 2000 pro,
      switch/Mode : -client -Xmixed -Xfuture
      JCK test owner : http://javaweb.eng/jck/usr/owners.jto
      Falling test[s]:
      api/java_swing/interactive/JRadioButtonTests.html#JRadioButton [JPMenutTests0005]
      api/java_swing/interactive/JCheckBoxTests.html#JCheckBox [JCheckBoxTest0005]
       
      Margins are not taken into account when drawing JRadioButton or JCheckBox.
      According to the Java API specification the setMargin method "sets space for margin between the button's border and the label".
      But no space is left with no regard to horizontal and vertical alignments of labels.
      The tests use only the left alignment so the bug is not obvious but I recompiled tests
      to use other aligment values and, though labels were aligned properly, no space were left on either side.

      MetalRadioButtonUI.paint implementation does not take into account margins set by setMargin.

      The bug is reproducible with Merlin.

      Test source location:
      =====================
      /net/jdk/export/disk8/local.java/jck1.4/JCK-runtime-14/tests/api/java_swing/interactive/JRadioButtonTests.java
      /net/jdk/export/disk8/local.java/jck1.4/JCK-runtime-14/tests/api/java_swing/interactive/JCheckBoxTests.java
       
      jtr file location:
      ==================
      /net/jtgb4u4c.eng/export/sail15/results/hopper/b10/jck14/linux/redhat7.2_gnome_smp_plugin_ns4.77_linux-24/workDir/api-interactive/javax_swing/interactive/JCheckBoxTests_JCheckBox.jtr
      /net/jtgb4u4c.eng/export/sail15/results/hopper/b10/jck14/linux/redhat7.2_gnome_smp_plugin_ns4.77_linux-24/workDir/api-interactive/javax_swing/interactive/JRadioButtonTests_JRadioButton.jtr

      How to reproduce:
      =================
      Run the following script (you may need to change JCK and JDK variables)


      --- script start ---
      #!/bin/sh
       
      JCK="/net/linux-15/export/home/java/jck1.4/JCK-runtime-14"
      JDK="/net/linux-15/export/home/java/jdk1.4.1/linux"
      switches="-client -Xmixed -Xfuture"
      CLASSPATH="${JCK}/classes:${JCK}/javatest.jar"
       
      $JDK/bin/java $switches -cp $CLASSPATH javasoft.sqe.tests.api.javax.swing.interactive.JRadioButton.JRadioButtonTests -TestCaseID JRadioButtonTest0005 -TestDirURL file:///${JCK}/tests/api/javax_swing/interactive

      --- script end ---

      Test output:
      ============
      JRadioButtonTest0005: Failed. setMargin(Insets) method does not work as expected.
      STATUS:Failed.tests: 1; failed: 1; first test case failure: JRadioButtonTest0005

      Specific Machine Info:
      ======================
      Hostname: linux-24
      OS: Linux RH 7.2

      ======================================================================

            shickeysunw Shannon Hickey (Inactive)
            alssunw Als Als (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: