🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #7917

mouseEvents in class derived from component

#7917
From: Stefan R�ck
Date: Tue, 01 May 2001 19:51
21 lines
1250 bytes
Hello,
I have created a class

public class Drawingpanel extends java.awt.Component

Drawingpanel () {
  super();
  addMouseListener(new MouseAdapter () {
    public void mouseClicked(MouseEvent e) {
      System.out.println("Clicked");
     }
  });
}


but it doesn't work! It actually does, when Drawingpanel derives from
java.awt.Panel instead of Component! Any suggestion?

Thanx in advance,
Ciao,
Stefan.
Technical Details
Message-ID: <3aef1304_1@dnews>
Path: arc1-ca.pugleaf.net!newsfeed.google.com!sn-xit-03!supernews.com!newsfeed.wirehub.nl!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!t-online.de!news1.dtag.de!news.gwi-ag.com!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,1c9677fbef465897,start
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-05-01 13:14:06 PST
From: "Stefan R�ck" <cerasus@gmx.de>
Newsgroups: borland.public.jbuilder.java.language
Subject: mouseEvents in class derived from component
Date: Tue, 1 May 2001 21:51:14 +0200
Lines: 23
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: 213.6.7.88
Message-ID: <3aef1304_1@dnews>
X-Trace: dnews 988746500 213.6.7.88 (1 May 2001 12:48:20 -0700)
Path: arc1-ca.pugleaf.net!newsfeed.google.com!sn-xit-03!supernews.com!newsfeed.wirehub.nl!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!t-online.de!news1.dtag.de!news.gwi-ag.com!dnews