🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #9427

Passing events to parents

#9427
From: janene_r_mccrillis
Date: Wed, 15 Mar 2000 00:00
22 lines
1600 bytes
I have a JPanel with little JPanels embedded within it. I have added a
RubberbandLine (from the Graphic Java book) to the top level JPanel.
When the user selects a certain mode, I want to be able to draw
rubberbands between the embedded JPanels. I can't figure out how to get
this to work. The embedded JPanels appear to be consuming the
MousePressed event and it never makes it to the RubberbandLine to start
the drawing. I read the section about firing events and I'm not getting
it - how do I pass the MousePressed event from the embedded JPanels to
the RubberbandLine? I cannot just call the MousePressed event handler as
it's an anonymous method within the class - not visible from outside the
RubberbandLine class.  BTW, the RubberbandLine does work when the
original click is not inside an embedded JPanel, but this isn't what I
want.

Thanks for the help.

Janene McCrillis
Lockheed Martin Space Systems, Denver Ops


Sent via Deja.com http://www.deja.com/
Before you buy.
Technical Details
Message-ID: <8aokda$sv$1@nnrp1.deja.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,edd2afba9a09b91a,start
X-Google-Attributes: gid111d45,public
From: janene_r_mccrillis@my-deja.com
Subject: Passing events to parents
Date: 2000/03/15
Message-ID: <8aokda$sv$1@nnrp1.deja.com>
X-Deja-AN: 597893577
X-Http-Proxy: 1.0 x27.deja.com:80 (Squid/1.1.22) for client 204.68.140.34
Organization: Deja.com - Before you buy.
X-Article-Creation-Date: Wed Mar 15 18:22:40 2000 GMT
X-MyDeja-Info: XMYDJUIDjanene_r_mccrillis
Newsgroups: borland.public.jbuilder.java.swing
X-Http-User-Agent: Mozilla/4.61 [en] (WinNT; U)