June 2005
Beginner to intermediate
336 pages
6h 29m
English
So how do you start creating the Robot? This project uses Java Swing to present the window you see in Figure 7.1. The main class, RobotProject (called that so as not to conflict with the Java Robot class), extends the Swing JFrame class and implements the ActionListener class to be able to handle events such as button clicks:
class RobotProject extends JFrame implements ActionListener
{
.
.
.
}
You can find the significant methods of the JFrame class in Table 7.1.
| Method | Does This |
|---|---|
| protected JRootPane createRootPane() | Called internally in order to create the default rootPane object |
| protected void frameInit() | Called internally to initialize the JFrame object ... |
Read now
Unlock full access