The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
November 2001



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


update new question

Posted by Zach Keatts on November 08, 2001 at 2:38 PM

I figured out, to a degree, how to use the mouse listener with images, but my problem now comes when trying to differentiate objects. the


method will only return a JLabel object. I have created a Card object that stores everything in it including the card label. To access the label I wrote something like

JLabel proc;
proc = (JLabel)proc.getLabel();

the problem with this is that when


is executed it still returning a label. I was curious if I can flag the object itself so that it will be transferred to the MouseEvent itself. How am I going to be able to access the relevant object when inside the MouseEvent?

-Zach Keatts

  • Try this Jay November 08, 2001 at 7:31 PM (1)
    • clever Zach Keatts November 09, 2001 at 1:48 PM (0)

Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us