Content deleted Content added
foldoc attribution Template_talk:FOLDOC#It_doesn't_matter_whether_readers_care |
|||
(3 intermediate revisions by 3 users not shown) | |||
Line 3:
[[File:Easy Java AWT example.jpg|thumb|250px|Windows form with some AWT examples]]
The '''Abstract Window Toolkit''' ('''AWT''') is [[Java (programming language)|Java]]'s original platform-dependent [[Windowing system|windowing]], [[graphic]]s, and [[user-interface]] [[widget toolkit]], preceding [[Swing (Java)|Swing]]. The AWT is part of the [[Java Foundation Classes]] (JFC) — the standard [[Application programming interface|API]] for providing a [[graphical user interface]] (GUI) for a Java program.<ref name="foldoc">{{foldoc|Abstract+Window+Toolkit}}</ref> AWT is also the GUI toolkit for a number of [[Java Platform, Micro Edition|Java ME]] profiles. For example, [[Connected Device Configuration]] profiles require Java [[software execution|runtime]]s on [[mobile telephone]]s to support the Abstract Window Toolkit.
== History ==
Line 25:
* The ability to launch some desktop applications such as [[web browser]]s and [[Mail client|email clients]] from a Java application.
Neither AWT nor Swing is inherently [[thread safety|thread safe]]. Therefore, code that updates the GUI or processes events should execute on the [[Event dispatching thread]]. Failure to do so may result in a [[Deadlock (computer science)|deadlock]] or race condition. To address this problem, a utility class called [[SwingWorker]] allows applications to perform time-consuming tasks following user-interaction events in the event dispatching thread.
== Mixing AWT and Swing components ==
Line 65:
public class MyApp {
public static void main(
Frame frame = new Frame("Application");
Line 152:
* {{Javadoc:SE-guide|awt|AWT documentation}}
*[https://web.archive.org/web/20161215114326/http://www.java-forums.org/awt-swing/ AWT/Swing]
*[http://www.java-tips.org/java-se-tips-100019/21-java-awt.html java.awt] {{Webarchive|url=https://web.archive.org/web/20160829004424/http://www.java-tips.org/java-se-tips-100019/21-java-awt.html |date=29 August 2016 }}
{{Java desktop}}
|