<s>
The	O
Abstract	B-Language
Window	I-Language
Toolkit	I-Language
(	O
AWT	O
)	O
is	O
Java	B-Language
's	O
original	O
platform-dependent	O
windowing	B-Application
,	O
graphics	O
,	O
and	O
user-interface	B-Application
widget	B-Library
toolkit	I-Library
,	O
preceding	O
Swing	B-Language
.	O
</s>
<s>
The	O
AWT	O
is	O
part	O
of	O
the	O
Java	B-Language
Foundation	I-Language
Classes	I-Language
(	O
JFC	O
)	O
—	O
the	O
standard	O
API	B-Application
for	O
providing	O
a	O
graphical	B-Application
user	I-Application
interface	I-Application
(	O
GUI	B-Application
)	O
for	O
a	O
Java	B-Language
program	O
.	O
</s>
<s>
AWT	O
is	O
also	O
the	O
GUI	B-Library
toolkit	I-Library
for	O
a	O
number	O
of	O
Java	B-Language
ME	I-Language
profiles	O
.	O
</s>
<s>
For	O
example	O
,	O
Connected	B-Language
Device	I-Language
Configuration	I-Language
profiles	O
require	O
Java	B-Language
runtimes	O
on	O
mobile	O
telephones	O
to	O
support	O
the	O
Abstract	B-Language
Window	I-Language
Toolkit	I-Language
.	O
</s>
<s>
When	O
Sun	O
Microsystems	O
first	O
released	O
Java	B-Language
in	O
1995	O
,	O
AWT	O
widgets	O
provided	O
a	O
thin	O
level	O
of	O
abstraction	O
over	O
the	O
underlying	O
native	O
user-interface	B-Application
.	O
</s>
<s>
However	O
,	O
a	O
check	O
box	O
on	O
Microsoft	B-Application
Windows	I-Application
is	O
not	O
exactly	O
the	O
same	O
as	O
a	O
check	O
box	O
on	O
Mac	B-Application
OS	I-Application
or	O
on	O
the	O
various	O
types	O
of	O
Unix	B-Application
.	O
</s>
<s>
Some	O
application	O
developers	O
prefer	O
this	O
model	O
because	O
it	O
provides	O
a	O
high	O
degree	O
of	O
fidelity	O
to	O
the	O
underlying	O
native	O
windowing	B-Library
toolkit	I-Library
and	O
seamless	O
integration	O
with	O
native	B-Language
applications	I-Language
.	O
</s>
<s>
In	O
other	O
words	O
,	O
a	O
GUI	B-Application
program	O
written	O
using	O
AWT	O
looks	O
like	O
a	O
native	O
Microsoft	B-Application
Windows	I-Application
application	O
when	O
run	O
on	O
Windows	O
,	O
but	O
the	O
same	O
program	O
looks	O
like	O
a	O
native	O
Apple	B-Device
Macintosh	I-Device
application	O
when	O
run	O
on	O
a	O
Mac	B-Device
,	O
etc	O
.	O
</s>
<s>
In	O
J2SE	B-Language
1.2	I-Language
,	O
the	O
Swing	B-Language
toolkit	O
largely	O
superseded	O
the	O
AWT	O
's	O
widgets	O
.	O
</s>
<s>
In	O
addition	O
to	O
providing	O
a	O
richer	O
set	O
of	O
UI	O
widgets	O
,	O
Swing	B-Language
draws	O
its	O
own	O
widgets	O
(	O
by	O
using	O
Java	B-Language
2D	I-Language
to	O
call	O
into	O
low-level	O
subroutines	O
in	O
the	O
local	O
graphics	O
subsystem	O
)	O
instead	O
of	O
relying	O
on	O
the	O
operating	B-General_Concept
system	I-General_Concept
's	O
high-level	O
user	B-Application
interface	I-Application
module	O
.	O
</s>
<s>
Swing	B-Language
provides	O
the	O
option	O
of	O
using	O
either	O
the	O
native	O
platform	O
's	O
"	O
look	O
and	O
feel	O
"	O
or	O
a	O
cross-platform	O
look	O
and	O
feel	O
(	O
the	O
"	O
Java	B-Language
Look	O
and	O
Feel	O
"	O
)	O
that	O
looks	O
the	O
same	O
on	O
all	O
windowing	B-Application
systems	I-Application
.	O
</s>
<s>
The	O
AWT	O
provides	O
two	O
levels	O
of	O
APIs	B-Application
:	O
</s>
<s>
A	O
general	O
interface	O
between	O
Java	B-Language
and	O
the	O
native	O
system	O
,	O
used	O
for	O
windowing	B-Application
,	O
events	B-Application
,	O
and	O
layout	B-Library
managers	I-Library
.	O
</s>
<s>
This	O
API	B-Application
is	O
at	O
the	O
core	O
of	O
Java	B-Language
GUI	B-Application
programming	O
and	O
is	O
also	O
used	O
by	O
Swing	B-Language
and	O
Java	B-Language
2D	I-Language
.	O
</s>
<s>
The	O
interface	O
between	O
the	O
native	O
windowing	B-Application
system	I-Application
and	O
the	O
Java	B-Language
application	O
;	O
</s>
<s>
The	O
core	O
of	O
the	O
GUI	B-Application
event	B-Application
subsystem	O
;	O
</s>
<s>
Several	O
layout	B-Library
managers	I-Library
;	O
</s>
<s>
A	O
package	B-Language
for	O
use	O
with	O
the	O
Clipboard	O
and	O
Drag	O
and	O
Drop	O
.	O
</s>
<s>
A	O
basic	O
set	O
of	O
GUI	B-Application
widgets	O
such	O
as	O
buttons	O
,	O
text	O
boxes	O
,	O
and	O
menus	O
.	O
</s>
<s>
It	O
also	O
provides	O
the	O
AWT	B-Library
Native	I-Library
Interface	I-Library
,	O
which	O
enables	O
rendering	O
libraries	B-Library
compiled	O
to	O
native	B-Language
code	I-Language
to	O
draw	O
directly	O
to	O
an	O
AWT	O
object	O
drawing	O
surface	O
.	O
</s>
<s>
The	O
ability	O
to	O
launch	O
some	O
desktop	O
applications	O
such	O
as	O
web	B-Application
browsers	I-Application
and	O
email	B-Protocol
clients	I-Protocol
from	O
a	O
Java	B-Language
application	O
.	O
</s>
<s>
Neither	O
AWT	O
nor	O
Swing	B-Language
are	O
inherently	O
thread	B-Operating_System
safe	I-Operating_System
.	O
</s>
<s>
Therefore	O
,	O
code	O
that	O
updates	O
the	O
GUI	B-Application
or	O
processes	O
events	B-Application
should	O
execute	O
on	O
the	O
Event	B-Language
dispatching	I-Language
thread	I-Language
.	O
</s>
<s>
Failure	O
to	O
do	O
so	O
may	O
result	O
in	O
a	O
deadlock	B-Operating_System
or	O
race	O
condition	O
.	O
</s>
<s>
To	O
address	O
this	O
problem	O
,	O
a	O
utility	O
class	O
called	O
SwingWorker	B-Library
allows	O
applications	O
to	O
perform	O
time-consuming	O
tasks	O
following	O
user-interaction	O
events	B-Application
in	O
the	O
event	B-Language
dispatching	I-Language
thread	I-Language
.	O
</s>
<s>
Where	O
there	O
is	O
a	O
Swing	B-Language
version	O
of	O
an	O
AWT	O
component	O
it	O
will	O
begin	O
with	O
J	O
-	O
and	O
should	O
be	O
used	O
exclusively	O
,	O
replacing	O
the	O
AWT	O
version	O
.	O
</s>
<s>
For	O
example	O
,	O
in	O
Swing	B-Language
,	O
only	O
use	O
JButton	O
,	O
never	O
Button	O
class	O
.	O
</s>
<s>
As	O
mentioned	O
above	O
,	O
the	O
AWT	O
core	O
classes	O
,	O
such	O
as	O
Color	O
and	O
Font	O
,	O
are	O
still	O
used	O
as-is	O
in	O
Swing	B-Language
.	O
</s>
<s>
When	O
drawing	O
in	O
Swing	B-Language
,	O
use	O
JPanel	O
and	O
override	O
paintComponent(Graphics g )	O
instead	O
of	O
using	O
the	O
AWT	O
paint( )	O
methods	O
.	O
</s>
<s>
Prior	O
to	O
Java	B-Language
6	O
Update	O
12	O
,	O
mixing	O
Swing	B-Language
components	O
and	O
basic	O
AWT	O
widgets	O
often	O
resulted	O
in	O
undesired	O
side	O
effects	O
,	O
with	O
AWT	O
widgets	O
appearing	O
on	O
top	O
of	O
the	O
Swing	B-Language
widgets	O
regardless	O
of	O
their	O
defined	O
z-order	B-Algorithm
.	O
</s>
<s>
This	O
problem	O
was	O
because	O
the	O
rendering	O
architecture	O
of	O
the	O
two	O
widget	B-Library
toolkits	I-Library
was	O
very	O
different	O
,	O
despite	O
Swing	B-Language
borrowing	O
heavyweight	O
top	O
containers	O
from	O
AWT	O
.	O
</s>
<s>
Starting	O
in	O
Java	B-Language
6	O
Update	O
12	O
,	O
it	O
is	O
possible	O
to	O
mix	O
Swing	B-Language
and	O
AWT	O
widgets	O
without	O
having	O
z-order	B-Algorithm
problems	O
.	O
</s>
<s>
As	O
the	O
AWT	O
is	O
a	O
bridge	O
to	O
the	O
underlying	O
native	O
user-interface	B-Application
,	O
its	O
implementation	O
on	O
a	O
new	O
operating	B-General_Concept
system	I-General_Concept
may	O
involve	O
a	O
lot	O
of	O
work	O
,	O
especially	O
if	O
it	O
involves	O
any	O
of	O
the	O
AWT	O
GUI	B-Application
widgets	O
,	O
because	O
each	O
of	O
them	O
requires	O
that	O
its	O
native	O
peers	O
be	O
developed	O
from	O
scratch	O
.	O
</s>
<s>
A	O
new	O
project	O
,	O
,	O
has	O
been	O
created	O
,	O
that	O
provides	O
an	O
OpenJDK-based	O
Java	B-Language
API	B-Application
to	O
ease	O
AWT	O
implementation	O
on	O
new	O
systems	O
.	O
</s>
<s>
The	O
project	O
has	O
successfully	O
implemented	O
AWT	O
widgets	O
using	O
Java2D	B-Language
.	O
</s>
<s>
All	O
the	O
necessary	O
core-JDK	O
modifications	O
have	O
since	O
been	O
pushed	O
to	O
OpenJDK	B-Language
7	I-Language
,	O
which	O
means	O
that	O
Java	B-Language
can	O
now	O
be	O
used	O
on	O
a	O
graphics	O
stack	O
other	O
than	O
one	O
of	O
those	O
provided	O
by	O
the	O
official	O
JDK	O
(	O
X	B-Operating_System
Window	I-Operating_System
System	I-Operating_System
,	O
OpenGL	B-Application
or	O
DirectX	B-Application
)	O
,	O
by	O
including	O
an	O
external	O
library	O
and	O
setting	O
some	O
system	O
properties	O
.	O
</s>
<s>
A	O
DirectFB	B-Application
backend	O
for	O
Caciocavallo	O
is	O
under	O
development	O
,	O
as	O
is	O
an	O
HTML5	B-Application
backend	O
;	O
the	O
aim	O
is	O
to	O
deploy	O
existing	O
Swing	B-Language
applications	O
—	O
without	O
Java	B-Language
support	O
—	O
as	O
ordinary	O
web	O
applications	O
running	O
on	O
a	O
web	O
server	O
.	O
</s>
