![]() ![]() Here are some key concepts for event handling in Java: Event listening interfaces (such as ActionListener, MouseListener, KeyListener and WindowListener).The event classes (such as ActionEvent, MouseEvent, KeyEvent and WindowEvent).import javax.swing.* Īs mentioned before, takes charge of handling the events. It is however not a good practice because you would be importing classes that are not useful to your program, diminishing the efficiency of your program. It is possible in Java to import a package and all classes that it contains by using the star “*” instead of the name of the desired class (see example above). Event handling is also included in this package. ![]()
0 Comments
Leave a Reply. |