updateAWT can
make the simplest replacements for you.
See =converting>How to Convert Your Program
for instructions and examples of using the script.
A table similar to this one is in nameChangesAWTSimple 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 gotFocus
can be replaced by processFocusEvent,
we'd rather you replaced it with
focusGained implemented in a FocusListener,
as described in
=convertingAWTevents>How to Convert Event-Handling Code
| Deprecated Method | Class Where Deprecated | 1.1 Replacement |
|---|---|---|
action
|
Component
|
See =convertingAWTevents>How to Convert Event-Handling Code for examples of handling action events. |
allowsMultipleSelections
|
List
|
isMultipleMode
|
appendText
|
TextArea
|
append
|
bounds
|
Component
|
getBounds
|
clear
|
List
|
removeAll
|
countComponents
|
Container
|
getComponentCount
|
countItems
|
Choice, List, Menu
|
getItemCount
|
countMenus
|
MenuBar
|
getMenuCount
|
deliverEvent
|
Component, Container
|
dispatchEvent
|
disable()
|
MenuItem
|
setEnabled(false)
|
enable()
|
Component, MenuItem
|
setEnabled(true)
|
enable(expression)
|
Component
|
setEnabled(expression)
|
getBoundingBox
|
Polygon
|
getBounds
|
getClipRect
|
Graphics
|
getClipBounds
|
getCurrent
|
CheckboxGroup
|
getSelectedCheckbox
|
getCursorType
|
Frame
|
getCursor method in Component
|
getLineIncrement
|
Scrollbar
|
getUnitIncrement
|
getPageIncrement
|
Scrollbar
|
getBlockIncrement
|
getPeer
|
Component
|
No replacement. |
getVisible
|
Scrollbar
|
getVisibleAmount
|
gotFocus
|
Component
|
processFocusEvent
See =convertingAWTevents>How to Convert Event-Handling Code for information on preferred ways to handle events. |
handleEvent
|
Component
|
processEvent
See =convertingAWTevents>How to Convert Event-Handling Code for information on preferred ways to handle events. |
hide
|
Component
|
setVisible(false)
|
insertText
|
TextArea
|
insert
|
insets
|
Container
|
getInsets
|
inside
|
Component, Polygon, Rectangle
|
contains
|
isSelected
|
List
|
isIndexSelected
|
keyDown
|
Component
|
processKeyEvent
See =convertingAWTevents>How to Convert Event-Handling Code for information on preferred ways to handle events. |
keyUp
|
Component
|
processKeyEvent
See =convertingAWTevents>How to Convert Event-Handling Code for information on preferred ways to handle events. |
layout
|
Component, Container, ScrollPane
|
doLayout
|
locate
|
Component, Container
|
getComponentAt
|
location
|
Component
|
getLocation
|
lostFocus
|
Component
|
processFocusEvent
See =convertingAWTevents>How to Convert Event-Handling Code for information on preferred ways to handle events. |
minimumSize
|
Component, Container, TextArea, TextField
|
getMinimumSize
|
mouseDown
|
Component
|
processMouseEvent
See =convertingAWTevents>How to Convert Event-Handling Code for information on preferred ways to handle events. |
mouseDrag
|
Component
|
processMouseMotionEvent
See =convertingAWTevents>How to Convert Event-Handling Code for information on preferred ways to handle events. |
mouseEnter
|
Component
|
processMouseEvent
See =convertingAWTevents>How to Convert Event-Handling Code for information on preferred ways to handle events. |
mouseExit
|
Component
|
processMouseEvent
See =convertingAWT.htm |
Bhopal news
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100