|
|
Start of Tutorial > Start of Trail > Start of Lesson |
Search
Feedback Form |
This section lists all the deprecated AWT methods and their 1.1 replacements. A script namedupdateAWTcan make the simplest replacements for you. See How to Convert Your Program for instructions and examples of using the script.A table similar to this one is in Simple Name Changes in the AWT. That table contains a bit less information than this one, and it's alphabetized by the 1.1 column to help you easily undo incorrect changes that the script has made.
In the following table, method names in bold font are the preferred method names. Some of the valid 1.1 substitutes for event-handling methods are less preferable than other 1.1 solutions. For example, although
gotFocuscan be replaced byprocessFocusEvent, we'd rather you replaced it withfocusGainedimplemented in aFocusListener, as described in How to Convert Event-Handling Code.
Deprecated Method Class Where Deprecated 1.1 Replacement actionComponentSee How to Convert Event-Handling Code for examples of handling action events. allowsMultipleSelectionsListisMultipleModeappendTextTextAreaappendboundsComponentgetBoundsclearListremoveAllcountComponentsContainergetComponentCountcountItemsChoice, List, MenugetItemCountcountMenusMenuBargetMenuCountdeliverEventComponent, ContainerdispatchEventdisable()MenuItemsetEnabled(false)enable()Component, MenuItemsetEnabled(true)enable(expression)ComponentsetEnabled(expression)getBoundingBoxPolygongetBoundsgetClipRectGraphicsgetClipBoundsgetCurrentCheckboxGroupgetSelectedCheckboxgetCursorTypeFramegetCursormethod inComponentgetLineIncrementScrollbargetUnitIncrementgetPageIncrementScrollbargetBlockIncrementgetPeerComponentNo replacement. getVisibleScrollbargetVisibleAmountgotFocusComponentprocessFocusEvent
See How to Convert Event-Handling Code for information on preferred ways to handle events.handleEventComponentprocessEvent
See How to Convert Event-Handling Code for information on preferred ways to handle events.hideComponentsetVisible(false)insertTextTextAreainsertinsetsContainergetInsetsinsideComponent, Polygon, RectanglecontainsisSelectedListisIndexSelectedkeyDownComponentprocessKeyEvent
See How to Convert Event-Handling Code for information on preferred ways to handle events.keyUpComponentprocessKeyEvent
See How to Convert Event-Handling Code for information on preferred ways to handle events.layoutComponent, Container, ScrollPanedoLayoutlocateComponent, ContainergetComponentAtlocationComponentgetLocationlostFocusComponentprocessFocusEvent
See How to Convert Event-Handling Code for information on preferred ways to handle events.minimumSizeComponent, Container, TextArea, TextFieldgetMinimumSizemouseDownComponentprocessMouseEvent
See How to Convert Event-Handling Code for information on preferred ways to handle events.mouseDragComponentprocessMouseMotionEvent
See How to Convert Event-Handling Code for information on preferred ways to handle events.mouseEnterComponentprocessMouseEvent
See How to Convert Event-Handling Code for information on preferred ways to handle events.mouseExitComponentprocessMouseEvent
See How to Convert Event-Handling Code for information on preferred ways to handle events.mouseMoveComponentprocessMouseMotionEvent
See How to Convert Event-Handling Code for information on preferred ways to handle events.mouseUpComponentprocessMouseEvent
See How to Convert Event-Handling Code for information on preferred ways to handle events.moveComponent, RectanglesetLocationnextFocusComponent, Container, WindowtransferFocuspostEventComponent, WindowdispatchEventpreferredSizeComponent, Container, TextArea, TextFieldgetPreferredSizereplaceTextTextAreareplaceRangereshapeComponent, RectanglesetBoundsresizeComponent, RectanglesetSizesetCurrentCheckboxGroupsetSelectedCheckboxsetCursorFramesetCursormethod inComponentsetEchoCharacterTextFieldsetEchoCharsetLineIncrementScrollbarsetUnitIncrementsetMultipleSelectionsListsetMultipleModesetPageIncrementScrollbarsetBlockIncrementshow()ComponentsetVisible(true)show(expression)ComponentsetVisible(expression)sizeComponentgetSize
|
|
Start of Tutorial > Start of Trail > Start of Lesson |
Search
Feedback Form |
Copyright 1995-2004 Sun Microsystems, Inc. All rights reserved.