The JavaTM Tutorial
Previous Page Lesson Contents Next Page Start of Tutorial > Start of Trail > Start of Lesson Search
Feedback Form

Trail: JDK(TM) 1.1 — And Beyond!
Lesson: Migrating to 1.1

Event-Conversion Table

The following table maps 1.0 events to their 1.1 counterparts. The first column lists each 1.0 event type, along with the name of the method (if any) that's specific to the event. Where no method is listed, the event is always handled in the handleEvent method. The second column lists the 1.0 components that can generate the event type. The third column lists the listener interface that helps you handle the 1.1 equivalents of the listed events. The fourth column lists the methods in each listener interface.

1.01.1
Event/MethodGenerated ByInterfaceMethods
ACTION_EVENT/action Button (in the API reference documentation), List (in the API reference documentation), MenuItem (in the API reference documentation), TextField (in the API reference documentation) ActionListener (in the API reference documentation) actionPerformed(ActionEvent)
Checkbox (in the API reference documentation), CheckboxMenuItem (in the API reference documentation), Choice (in the API reference documentation) ItemListener (in the API reference documentation) itemStateChanged(ItemEvent)
WINDOW_DESTROY
WINDOW_EXPOSE
WINDOW_ICONIFY
WINDOW_DEICONIFY
Dialog (in the API reference documentation), Frame (in the API reference documentation) WindowListener (in the API reference documentation) windowClosing(WindowEvent)
windowOpened(WindowEvent)
windowIconified(WindowEvent)
windowDeiconified(WindowEvent)
windowClosed(WindowEvent) (no 1.0 equivalent)
windowActivated(WindowEvent) (no 1.0 equivalent)
windowDeactivated(WindowEvent) (no 1.0 equivalent)
WINDOW_MOVED Dialog (in the API reference documentation), Frame (in the API reference documentation) ComponentListener (in the API reference documentation) componentMoved(ComponentEvent)
componentHidden(ComponentEvent) (no 1.0 equivalent)
componentResized(ComponentEvent) (no 1.0 equivalent)
componentShown(ComponentEvent) (no 1.0 equivalent)
SCROLL_LINE_UP
SCROLL_LINE_DOWN
SCROLL_PAGE_UP
SCROLL_PAGE_DOWN
SCROLL_ABSOLUTE
SCROLL_BEGIN
SCROLL_END
Scrollbar (in the API reference documentation) AdjustmentListener (in the API reference documentation)
(or use the new ScrollPane (in the API reference documentation)class)
adjustmentValueChanged(AdjustmentEvent)
LIST_SELECT
LIST_DESELECT
Checkbox (in the API reference documentation), CheckboxMenuItem (in the API reference documentation), Choice (in the API reference documentation), List (in the API reference documentation) ItemListener (in the API reference documentation) itemStateChanged(ItemEvent)
MOUSE_DRAG/mouseDrag
MOUSE_MOVE/mouseMove
Canvas (in the API reference documentation), Dialog (in the API reference documentation), Frame (in the API reference documentation), Panel (in the API reference documentation), Window (in the API reference documentation) MouseMotionListener (in the API reference documentation) mouseDragged(MouseEvent)
mouseMoved(MouseEvent)
MOUSE_DOWN/mouseDown
MOUSE_UP/mouseUp
MOUSE_ENTER/mouseEnter
MOUSE_EXIT/mouseExit
Canvas (in the API reference documentation), Dialog (in the API reference documentation), Frame (in the API reference documentation), Panel (in the API reference documentation), Window (in the API reference documentation) MouseListener (in the API reference documentation) mousePressed(MouseEvent)
mouseReleased(MouseEvent)
mouseEntered(MouseEvent)
mouseExited(MouseEvent)
mouseClicked(MouseEvent) (no 1.0 equivalent)
KEY_PRESS/keyDown
KEY_RELEASE/keyUp
KEY_ACTION/keyDown
KEY_ACTION_RELEASE/keyUp
Component (in the API reference documentation) KeyListener (in the API reference documentation) keyPressed(KeyEvent)
keyReleased(KeyEvent)
keyTyped(KeyEvent) (no 1.0 equivalent)
GOT_FOCUS/gotFocus
LOST_FOCUS/lostFocus
Component (in the API reference documentation) FocusListener (in the API reference documentation) focusGained(FocusEvent)
focusLost(FocusEvent)
No 1.0 equivalent. ContainerListener (in the API reference documentation) componentAdded(ContainerEvent)
componentRemoved(ContainerEvent)
No 1.0 equivalent. TextListener (in the API reference documentation) textValueChanged(TextEvent)


Previous Page Lesson Contents Next Page Start of Tutorial > Start of Trail > Start of Lesson Search
Feedback Form

Copyright 1995-2005 Sun Microsystems, Inc. All rights reserved.