The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
January 2001

Advertisement

Advertisement

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.

Message:

Use an inner class, for example

Posted by richard on January 15, 2001 at 10:12 AM

> Hi All!!!
> How can I proccess the Event "MouseEnter" for some Button in MsVJ++6.0 ?
> Thanks !!!

Kum-Kum:

Try this (wherever you are setting up your display, b is a button):

b.addMouseListener(new MouseAdapter()
{
public void mouseEntered(MouseEvent e)
{
b.setForeground(Color.blue); // or whatever
}
public void mouseExited(MouseEvent e)
{
b.setForeground(Color.black);
}
});

It works in Java so it ought to work in VJ++ right? If not... switch to the real thing :)

richard




Replies:

Sponsored Links



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