Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 240791 Details for
Bug 355571
Lightweight Components Respond Strangely to Mouse Events
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Simplistic Applet/Application that demonstrates the problem.
Dots.java (text/x-java), 1.64 KB, created by
Jeff Gold
on 2007-10-28 02:04:21 UTC
(
hide
)
Description:
Simplistic Applet/Application that demonstrates the problem.
Filename:
MIME Type:
Creator:
Jeff Gold
Created:
2007-10-28 02:04:21 UTC
Size:
1.64 KB
patch
obsolete
>import java.applet.*; >import java.awt.*; >import java.awt.event.*; > >class LightDots extends Component implements MouseListener { > LightDots() { addMouseListener(this); } > public void mouseClicked(MouseEvent e) {} > public void mouseEntered(MouseEvent e) {} > public void mouseExited(MouseEvent e) {} > public void mousePressed(MouseEvent e) {} > public void mouseReleased(MouseEvent e) { blue = !blue; repaint(); } > boolean blue = false; > public void paint(Graphics g) { > if (blue) g.setColor(Color.BLUE); > else g.setColor(Color.RED); > Dimension dim = getSize(); > g.fillOval(0, 0, dim.width, dim.height); > } >} > >class HeavyDots extends Canvas implements MouseListener { > HeavyDots() { addMouseListener(this); } > public void mouseClicked(MouseEvent e) {} > public void mouseEntered(MouseEvent e) {} > public void mouseExited(MouseEvent e) {} > public void mousePressed(MouseEvent e) {} > public void mouseReleased(MouseEvent e) { blue = !blue; repaint(); } > boolean blue = false; > public void paint(Graphics g) { > if (blue) g.setColor(Color.BLUE); > else g.setColor(Color.RED); > Dimension dim = getSize(); > g.fillOval(0, 0, dim.width, dim.height); > } >} > >public class Dots extends Applet { > public void init() { > setLayout(new GridLayout()); > add(new LightDots()); > add(new HeavyDots()); > } > public static void main(String args[]) { > Frame f = new Frame("GCJ Bug Demonstration"); > f.setLayout(new GridLayout()); > f.add(new LightDots()); > f.add(new HeavyDots()); > f.setSize(320, 240); > f.setVisible(true); > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 355571
: 240791 |
240801