JDK-4788946 : Two JCK1.4a api/java/awt/interactive tests fail
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.4.2
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS:
    linux,solaris_8,solaris_9,windows_98,windows_nt,windows_2000 linux,solaris_8,solaris_9,windows_98,windows_nt,windows_2000
  • CPU: x86,sparc,itanium
  • Submitted: 2002-12-05
  • Updated: 2017-05-16
  • Resolved: 2011-05-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 Other
7 b04Fixed OpenJDK6Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
Name: iaR10016			Date: 12/05/2002


Filed By       : J2SE-SQA [###@###.###
JDK            : JDK1.4.2-b08, JDK1.4.0, JDK1.4.1
JCK            : JCK1.4a-runtime
Platform[s]    : Windows 98, RedHat Linux 7.3, Solaris Sparc, Solaris intel
switch/Mode    : default
JCK test owner : http://javaweb.eng/jck/usr/owners.jto
Falling test[s]:
        api/java_awt/interactive/FlowLayoutTests.html#FlowLayoutTests [FlowLayoutTest0002]
        api/java_awt/interactive/CardLayoutTests.html#CardLayoutTests [CardLayoutTest0003]

Two JCK1.4a-runtime tests fail on JDK1.4.0, JDK1.4.1, JDK1.4.2.

SetVgap(int) and setHgap(int) methods for FlowLayout and CardLayout do not work as expected
if their integer parameters are big enough.

Please do the following to see the failure:

1. Run api/java_awt/interactive/FlowLayoutTests.html#FlowLayoutTests [FlowLayoutTest0002]
testcase. Set "setHgap" parameter to 10 000 and click "setHgap" button. All the tested components
are visible in the tested frame. Their location is OK now. Maximize and then minimize test
window. There are no components in the tested frame. It is also inpossible to click "Yes"/"No"
buttons or change "setHgap"/"setVgap" parameters now.
Please, note that if you set Hgap to 100 000, test window behaves correctly.
Testcase api/java_awt/interactive/CardLayoutTests.html#CardLayoutTests [CardLayoutTest0003]
fails with the same way but with another parameters (for example, try to set Hgap to 100 000 and
maximize/minimize tested window for this test: "Yes"/"No" buttons will disappear).

2. In both tests setting Hgap or Vgap to 2147483647 (max integer number) has the same visible
effect as setting these parameters to 0.

Test source location:
=====================
/java/re/jck/1.4a/promoted/fcs/binaries/JCK-runtime-14a/tests/api/java_awt/interactive/FlowLayoutTests.java
/java/re/jck/1.4a/promoted/fcs/binaries/JCK-runtime-14a/tests/api/java_awt/interactive/CardLayoutTests.java

jtr file location:
==================
/net/jtgb4u4c.sfbay/export/sail15/results/mantis/b08/jck14a/win32/win98_client_XUseParallelGC_linux-17/workDir/api-interactive/java_awt/interactive/FlowLayoutTests_FlowLayoutTests.jtr
/net/jtgb4u4c.sfbay/export/sail15/results/mantis/b08/jck14a/win32/win98_client_XUseParallelGC_linux-17/workDir/api-interactive/java_awt/interactive/CardLayoutTests_CardLayoutTests.jtr

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

--- script start ---
#!/bin/bash
JCK="/java/re/jck/1.4a/promoted/fcs/binaries/JCK-runtime-14a"
JDK="/net/jdk/export/disk8/local.java/jdk1.4/linux-i386"
export CLASSPATH="$JCK/classes:$JCK/lib/javatest.jar"
$JDK/bin/java javasoft.sqe.tests.api.java.awt.interactive.FlowLayoutTests -TestCaseID FlowLayoutTest0002
$JDK/bin/java javasoft.sqe.tests.api.java.awt.interactive.CardLayoutTests -TestCaseID CardLayoutTest0003
--- script end ---

Specific machine info:
======================
Hostname: linux-17
OS: Windows 98

Hostname: linux-19
OS: RedHat Linux 7.3 (GNOME)

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

Comments
SUGGESTED FIX add to java/awt/package.html following note: +Each {@code Component} object is limited in its maximum size and +its location because the values are stored as an integer. +Also, a platform may further restrict maximum size and location +coordinates. The exact maximum values are dependent on the platform. +There is no way to change these maximum values, either in Java +code or in native code. +These limitations also impose restrictions on component layout. +If the bounds of a Component object exceed a platform limit, +there is no way to properly arrange them within a Container object. +The object's bounds are defined by any object's coordinate +in combination with its size on a respective axis.
25-10-2006

EVALUATION Should mention a native window restrictions on components.
16-01-2006

EVALUATION Commit to fix in Tiger (JCK failure, not red for Mantis) ###@###.### 2002-12-05 What exactly is the "expected behavior" for a horizontal gap of 10,000? 7 Components with 10,000 pixels on either side makes for a Panel ~80,000 pixels wide. When the Frame is maximized, the test's Panels are all set to this outrageous width. The setHgap & setVgap buttons, being centered, will be placed at X-coordinate ~40,000. This far off of any window that will fit on a standard 1280x1024 monitor. One "actual" problem is that the 80,000 pixel wide panels don't seem to fit inside a ScrollPane on Solaris. This is almost certainly due to limitations of the native windowing system. Consider that if Motif can't handle ScrollPanes wider than 32,768 pixels, an X-coordinate of 40,000 wouldn't be visible. Better results might come of not putting the test inside a ScrollPane. For Tiger, I imagine we will have to add some JavaDoc indicating that some APIs are limited by the underlying native toolkit. ###@###.### 2002-12-10
10-12-2002