Qiang Qiang Xi wrote:It doesn't work and I am not allowed to change the function for testing only
What do you mean by it doesn't work.. ? Are you still getting same exception ?
Are you sure about this code ? I am not sure with this code.. What is Display ? Shell ?
MouseEvent,from which package you have imported it ? in java.awt.Event there is no such Constructor like MouseEvent(Event event)
So.. If you don't mind check your code again..
If you don't get any solution.., Let's wait and see what other peoples have to say ?