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...:)

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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.