I have the following code:
addMouseListener(new MouseAdapter()
{
public void mousePressed(MouseEvent e)
{
System.out.println("MousePressed");
}});
and when i first open my program and i click on the Canvas i get one mousePressed event...
but if I resize or click a button and then click back on the canvas I will get multiple moused pressed events.
Why is this happening and how can i fix it?????
Thanks
addMouseListener(new MouseAdapter()
{
public void mousePressed(MouseEvent e)
{
System.out.println("MousePressed");
}});
and when i first open my program and i click on the Canvas i get one mousePressed event...
but if I resize or click a button and then click back on the canvas I will get multiple moused pressed events.
Why is this happening and how can i fix it?????
Thanks