62,621
社区成员
发帖
与我相关
我的任务
分享
outputJTextArea.addKeyListener(
new KeyListener() // anonymous inner class
{
// event handler called when any key is pressed
public void keyPressed( KeyEvent event )
{
outputJTextAreaKeyPressed( event );
}
// event handler called when any key is released
public void keyReleased( KeyEvent event )
{
outputJTextAreaKeyReleased( event );
}
// event handler called when any key is typed
public void keyTyped( KeyEvent event )
{
}
} // end anonymous inner class
); // end call to addKeyListener
outputJTextArea.addFocusListener(
new FocusAdapter() // anonymous inner class
{
// event handler called when outputJTextArea loses focus
public void focusLost( FocusEvent event )
{
outputJTextAreaFocusLost( event );
}
} // end anonymous inner class
); // end call to addFocusListener