Although the use of abstract classes is to make the code concise, but you define the abstract class, but do not know what the abstract class specifically what to write.
This week you learned the fill of the frame content.
Adds a button to the content box, and a background color when the button executes.
JButton Yellowbutton = new JButton ("Yellow");//Tag string
Buttonpanel = new JPanel ();
Buttonpanel.add (Yellowbutton); button is added to the panel.
Coloraction yellowaction = new coloraction (Color. YELLOW); Create a Color object
Yellowbutton.addactionlistener (yellowaction);//Listener, Listener button object
A method that maps buttons and keyboard actions to action objects in a GUI program.
Mouse click: When the mouse click on the window to produce a small box, when the mouse inside the small box, the cursor becomes a 10 glyph. The mouse can stall small blocks to move. When you double-click a small square, wipe the small square.
201671010131 2016-2017-2 "Java Programming"