Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / November 2003

Tip: Looking for answers? Try searching our database.

What did i forgot [ public void mouseClicked (MouseEvent e) ]

Thread view: 
Konrad Den Ende - 23 Nov 2003 15:34 GMT
It's been a while since my last encounter with Swing so it
must be something i simply forgot.

I extend a JPanel and implement MouseListener. All the
methods have empty bodies except for:
public void mouseClicked (MouseEvent e)
   {JOptionPane.showMessageDialog (null, "");}

However, nothing comes up when i click within the JPanel...

One guess is that i need to add my code to the frame that the
JPanel is hold by but that's kind of not what i'm aiming at. I
need to keep the clicking-events within the panel.

What do i forgot?

Signature

Kindly
Konrad
---------------------------------------------------
May all spammers die an agonizing death; have no burial places;
their souls be chased by demons in Gehenna from one room to
another for all eternity and more.

Sleep - thing used by ineffective people
           as a substitute for coffee

Ambition - a poor excuse for not having
                enough sence to be lazy
---------------------------------------------------

Konrad Den Ende - 23 Nov 2003 16:31 GMT
Nevermind. Dum a.s (that's me) forgot to add
this.addMouseListener (this);

Stupid mistake...

Signature

Kindly
Konrad
---------------------------------------------------
May all spammers die an agonizing death; have no burial places;
their souls be chased by demons in Gehenna from one room to
another for all eternity and more.

Sleep - thing used by ineffective people
           as a substitute for coffee

Ambition - a poor excuse for not having
                enough sence to be lazy
---------------------------------------------------

VisionSet - 23 Nov 2003 16:46 GMT
> I extend a JPanel and implement MouseListener. All the
> methods have empty bodies except for:
[quoted text clipped - 4 lines]
>
> What do i forgot?

yourPanel.addMouseListener(this); ?

Signature

Mike W



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.