> > hello all.
>
[quoted text clipped - 28 lines]
>
> Matt Humphreyhttp://www.iviz.com/
On Jan 19, 10:21 pm, "Matt Humphrey" <ma...@iviz.com> wrote:
> hello sir/madam,
> i Mst. Manminder Singh need some help regarding the use of mouse-
[quoted text clipped - 4 lines]
> please reply me to the earliest, waiting for your response. please
> attach any sample program without the use of applet.
I'm not sure what you're asking, or whether your question is related to the
prior discussion. A Java application (GUI) can detect mouse clicking by
adding a MouseListener or MouseAdapter to an existing GUI component. The
listener or adapter will receive method calls as the mouse is clicked,
pressed, released, etc. This tutorial explains in detail how to do this
http://java.sun.com/docs/books/tutorial/uiswing/events/mouselistener.html
but generally you would say:
myComponent.addMouseListener (new MouseAdapter () {
public void mouseClicked (MouseEvent e) {
// Put your code to do something on the click here
}
}
Many GUI components (trees, text areas, tables, buttons, etc) already
understand how to process mouse events specific to their own function, so
you would not use this with them. You'll have to say more about what you're
trying to do.
Matt Humphrey http://www.iviz.com/