Article View: borland.public.jbuilder.java.language
Article #7920Re: mouseEvents in class derived from component
From: John McGrath [TeamB]
Date: Tue, 01 May 2001 22:39
Date: Tue, 01 May 2001 22:39
18 lines
1471 bytes
1471 bytes
"Stefan R�ck" <cerasus@gmx.de> wrote: > public class Drawingpanel extends java.awt.Component > but it doesn't work! It actually does, when Drawingpanel derives from > java.awt.Panel instead of Component! Any suggestion? It has been a long time since I mucked with raw AWT components, so I may not have this exactly right. But I believe that events are not enabled by default in Component, but are in Container, and Panel extends Container. If you call enableEvents( AWTEvent.MOUSE_EVENT_MASK ), I think it should work. -- Regards, John McGrath [TeamB]
Technical Details
Message-ID:
<3aef3b28$1_2@dnews>Path:
arc1-ca.pugleaf.net!newsfeed.google.com!sn-xit-03!supernews.com!cyclone-sjo1.usenetserver.com!news-out-sjo.usenetserver.com!hub1.nntpserver.com!news-in.nibble.net!newsfeed01.sul.t-online.de!t-online.de!dnewsReferences:
<3aef1304_1@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: f74b3,1c9677fbef465897 X-Google-Attributes: gidf74b3,public X-Google-ArrivalTime: 2001-05-01 15:44:05 PST From: "John McGrath [TeamB]" <ng-b@JPMcGrath.net> Newsgroups: borland.public.jbuilder.java.language References: <3aef1304_1@dnews> Subject: Re: mouseEvents in class derived from component Date: Tue, 1 May 2001 18:39:33 -0400 Lines: 20 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 NNTP-Posting-Host: 204.95.116.67 Message-ID: <3aef3b28$1_2@dnews> X-Trace: dnews 988756776 204.95.116.67 (1 May 2001 15:39:36 -0700) Path: arc1-ca.pugleaf.net!newsfeed.google.com!sn-xit-03!supernews.com!cyclone-sjo1.usenetserver.com!news-out-sjo.usenetserver.com!hub1.nntpserver.com!news-in.nibble.net!newsfeed01.sul.t-online.de!t-online.de!dnews