Description: Programming ideas: this exercise because Huarong game characters to achieve the structure, so the first character to generate said rectangular block, which is by the statement Rectangle rect = null instantiated Rectangle class, then class' s constructor People rect by the statement = new Rectangle (x, y, w, h) to achieve the structure Me characters. Then because to achieve the effect of human-computer interaction, so to respond to the current cursor focus events, through public void focusGained (FocusEvent e) function to get the focus, the focus of the current function lost through public void focusLost (FocusEvent e), the parameter is the focus of the event class FocusEvent The object e. Finally, because the focus moves to tie to set the color, so use a color class Color, when I get the focus through the statement setBackground (Color.red) set the background color to red, when losing focus, By statement setBackground (Color.orange) set the background color to orange
To Search:
File list (Check if you may need any files):
练习95华容道(一)\HuaRongRoad.class
..................\HuaRongRoad.html
..................\HuaRongRoad.java
..................\People.class
..................\_desktop.ini
..................\练习95华容道(一).doc
练习95华容道(一)