Bug 355571 - Lightweight Components Respond Strangely to Mouse Events
Lightweight Components Respond Strangely to Mouse Events
Product: Fedora
Classification: Fedora
Component: java-1.5.0-gcj (Show other bugs)
i386 Linux
low Severity low
: ---
: ---
Assigned To: Thomas Fitzsimmons
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2007-10-27 22:02 EDT by Jeff Gold
Modified: 2008-04-02 20:45 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-04-02 17:59:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Simplistic Applet/Application that demonstrates the problem. (1.64 KB, text/x-java)
2007-10-27 22:04 EDT, Jeff Gold
no flags Details
Simplistic web page to demonstrate problem as an Applet (222 bytes, text/html)
2007-10-27 22:05 EDT, Jeff Gold
no flags Details

  None (edit)
Description Jeff Gold 2007-10-27 22:02:35 EDT
I will attach Dots.java and dots.html as soon as I have filed this bug. 
Dots.java is an Applet that contains an instance of LightDots, which extends
Component and is therefore a Lightweight Component, and HeavyDots, which extends
Canvas and so isn't.  Both are otherwise essentially identical.  They draw a
filled oval in either blue or red, depending on their state.  Each mouseReleased
event they receive toggles that state.

When I try this in Firefox using gcjwebplugin the HeavyDots instance is
clickable while the LightDots instance seems to ignore all events.  However, the
static main method of Dots adds the same components to a Frame instead of an
Applet and both instances respond to clicks.  For some reason the lightweight
component also responds when clicking on the heavyweight component in that case.

I tried this same simplistic applet against the Sun Java plugin on WindowsXP and
found exactly the behavior I would expect.  Clicking either side works and
toggles only that side.

Version-Release: java-1.5.0-gcj-
How reproducible: Always
Steps to Reproduce:
1. javac Dots.java
2. firefox dots.html
3. java Dots
Actual results: No response to mouse clicks on the left side when in applet form
and overzealous response on the left side to clicks on the right when used
within a Frame.

Expected results:  Toggle only the side clicked, just as can be seen with the
Sun JDK on WindowsXP.
Comment 1 Jeff Gold 2007-10-27 22:04:21 EDT
Created attachment 240791 [details]
Simplistic Applet/Application that demonstrates the problem.
Comment 2 Jeff Gold 2007-10-27 22:05:54 EDT
Created attachment 240801 [details]
Simplistic web page to demonstrate problem as an Applet
Comment 3 Thomas Fitzsimmons 2008-04-02 17:59:58 EDT
Use OpenJDK instead.  I tested this in applet and application form on i386
Rawhide against these packages:


and it worked fine.  (Actually I modified dots.html to use the applet tag
instead of the object tag.)
Comment 4 Jeff Gold 2008-04-02 20:45:03 EDT
Fair enough.  Thanks.

Note You need to log in before you can comment on or make changes to this bug.