?? people.java
字號:
/*
* Created on 2007-4-13
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
/**
* @author hulmous
*
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Style - Code Templates
*/
import java.awt.*;
import java.applet.*;
import java.awt.event.*;
public class People extends Button implements FocusListener{
Rectangle rect=null;
int left_x,left_y;//按鈕的左上角坐標
int width,heigth;//按鈕的寬和高
String name;
int number;
People(int number,String s,int x,int y,int w,int h,HuaRongRoad road){
super(s);
name=s;
this.number=number;
left_x=x;
left_y=y;
width=w;
heigth=h;
setBackground(Color.orange);
road.add(this);
addKeyListener(road);
setBounds(x,y,w,h);
addFocusListener(this);
rect=new Rectangle(x,y,w,h);
}
public void focusGained(FocusEvent e){
setBackground(Color.red);
}
public void focusLost(FocusEvent e){
setBackground(Color.orange);
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -