怎么获得其中输入的内容
------解决方案--------------------
addFocusListener(new FocusAdapter(){
@Override public void focusLost(FocusEvent e){
// 失去焦点时,可以认为输入结束
}
});
addActionListener(new ActionListener(){
@Override public void actionPerformed(ActionEvent e){
// 按下回车
}
}