textField.addMouseListener(new MouseAdapter() { //鼠标在textField中时,改变btnNewButton的文本内容 貌似我的概念是混乱的,用控件乱用哈,哈哈
public void mousePressed(MouseEvent e) {
btnNewButton.setText("按下鼠标" );
}
@Override
public void mouseReleased(MouseEvent e) {
btnNewButton.setText("松开鼠标" );
}
@Override
public void mouseEntered(MouseEvent e) {
btnNewButton.setText("鼠标进入" );
}