📄 person.java
字号:
import java.awt.*;
import java.awt.event.*;
public class Person extends Button implements FocusListener
{ int number;
Color c=new Color(255,245,170);
Person(int number,String s)
{ super(s);
setBackground(c);
this.number=number;
c=getBackground();
addFocusListener(this);
}
public void focusGained(FocusEvent e)
{ setBackground(Color.blue);
}
public void focusLost(FocusEvent e)
{ setBackground(c);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -