Hi all...
What is the purpose of built in class

Say for example in event handling event class are : ActionEvent,MouseEvent,ComponentEvent,ContainerEvent... like that what is the purpose of this classes and in which case we are using this kind of the classes.

Thanks...:)

Recommended Answers

When you handle one of those events the event classes contain information about the event, eg which component was the source of the event, the x,y coordinates if it was a mouse click, which keyboard modifier keys were pressed at the time etc

Jump to Post

All 2 Replies

When you handle one of those events the event classes contain information about the event, eg which component was the source of the event, the x,y coordinates if it was a mouse click, which keyboard modifier keys were pressed at the time etc

You can use those classes when you want to capture mouse clicks, mouse scrolls, drags, enterings, leaves, keyboard klicks, keyboard typing etc.

Most of these classes are used with GUIs, to let the user have more interaction with the program. As far as I know, mostly games will use these classes, because you can handle the keyboard and mouse.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.