Java Platform, Standard Edition ( Java SE ) is a computing platform for development and deployment of portable code for desktop and server environments. Java SE was formerly known as Java 2 Platform, Standard Edition ( J2SE ).
45-665: AWT may stand for: The Abstract Window Toolkit , part of the Java programming language Antony Worrall Thompson , the British chef Aphrodite World Tour , a 2011 concert tour by Australian pop/dance singer Kylie Minogue Armathwaite railway station , England; National Rail station code AWT Airborne wind turbine , a concept design wind turbine Withholding tax , Automatic Withholding Tax (also known as WHT) Advanced World Transport , Czech cargo railway operator Alternative Waste Treatment,
90-468: A Proxy class that supports dynamic creation of proxy classes that implement specified interfaces. The implementation of a Proxy class is provided by a supplied object that implements the InvocationHandler interface. The InvocationHandler 's invoke(Object, Method, Object[]) method is called for each method invoked on the proxy object—the first parameter is the proxy object,
135-554: A Java program. AWT is also the GUI toolkit for a number of Java ME profiles. For example, Connected Device Configuration profiles require Java runtimes on mobile telephones to support the Abstract Window Toolkit. When Sun Microsystems first released Java in 1995, AWT widgets provided a thin level of abstraction over the underlying native user-interface. For example, creating an AWT check box would cause AWT directly to call
180-416: A bean editing tool, in which beans can be combined, customized, and manipulated. One type of bean editor is a GUI designer in an integrated development environment . The java.awt , or Abstract Window Toolkit, provides access to a basic set of GUI widgets based on the underlying native platform's widget set, the core of the GUI event subsystem, and the interface between the native windowing system and
225-410: A byte-offset within the file for the next read or write operation. The file pointer is moved implicitly by reading or writing and explicitly by calling the seek(long) or skipBytes(int) methods. The current position of the file pointer is returned by the getFilePointer() method. The File class represents a file or directory path in a file system . File objects support
270-417: A few miscellaneous classes to support interactions with the host file system . The stream classes follow the decorator pattern by extending the base subclass to add features to the stream classes. Subclasses of the base stream classes are typically named for one of the following attributes: The stream subclasses are named using the naming pattern XxxStreamType where Xxx is the name describing
315-478: A file, but can also be a console or network socket . FileDescriptor objects are used to create File streams. They are obtained from File streams and java.net sockets and datagram sockets. In J2SE 1.4, the package java.nio (NIO or Non-blocking I/O) was added to support memory-mapped I/O , facilitating I/O operations closer to the underlying hardware with sometimes dramatically better performance. The java.nio package provides support for
360-456: A graphics stack other than one of those provided by the official JDK ( X Window System , OpenGL or DirectX ), by including an external library and setting some system properties. A DirectFB backend for Caciocavallo is under development, as is an HTML5 backend; the aim is to deploy existing Swing applications—without Java support—as ordinary web applications running on a web server. Java Platform, Standard Edition The platform uses
405-600: A native Microsoft Windows application when run on Windows, but the same program looks like a native Apple Macintosh application when run on a Mac, etc. However, some application developers dislike this model because they prefer their applications to look exactly the same on every platform. In J2SE 1.2 , the Swing toolkit largely superseded the AWT's widgets. In addition to providing a richer set of UI widgets, Swing draws its own widgets (by using Java 2D to call into low-level subroutines in
450-564: A new operating system may involve a lot of work, especially if it involves any of the AWT GUI widgets, because each of them requires that its native peers be developed from scratch. A new project, Caciocavallo , has been created, that provides an OpenJDK -based Java API to ease AWT implementation on new systems. The project has successfully implemented AWT widgets using Java2D . All the necessary core-JDK modifications have since been pushed to OpenJDK 7 , which means that Java can now be used on
495-636: A number of buffer types. The subpackage java.nio.charset provides support for different character encodings for character data. The subpackage java.nio.channels provides support for channels, which represent connections to entities that are capable of performing I/O operations, such as files and sockets. The java.nio.channels package also provides support for fine-grained locking of files. The java.math package supports multiprecision arithmetic (including modular arithmetic operations) and provides multiprecision prime number generators used for cryptographic key generation. The main classes of
SECTION 10
#1732852588665540-418: A number that are more useful to programs that run on servers as opposed to workstations . Java Platform, Micro Edition (Java ME) is a related specification intended to provide a certified collection of Java APIs for the development of software for small, resource-constrained devices such as cell phones , PDAs and set-top boxes . The Java Runtime Environment (JRE) and Java Development Kit (JDK) are
585-500: A subset of waste treatment. List of solid waste treatment technologies Topics referred to by the same term [REDACTED] This disambiguation page lists articles associated with the title AWT . If an internal link led you here, you may wish to change the link to point directly to the intended article. Retrieved from " https://en.wikipedia.org/w/index.php?title=AWT&oldid=745073848 " Category : Disambiguation pages Hidden categories: Short description
630-558: Is a collection of routines that build on java.awt to provide a platform independent widget toolkit . javax.swing uses the 2D drawing routines to render the user interface components instead of relying on the underlying native operating system GUI support. This package contains the largest number of classes (133 in all) in JDK 6. This package, along with java.awt also contains the largest number of enums (7 in all) in JDK 6. It supports pluggable looks and feels (PLAFs) so that widgets in
675-480: Is a constituent of the Java API that lets Java code examine and "reflect" on Java components at runtime and use the reflected members. Classes in the java.lang.reflect package, along with java.lang.Class and java.lang.Package accommodate applications such as debuggers , interpreters , object inspectors, class browsers , and services such as object serialization and JavaBeans that need access to either
720-468: Is accomplished through stream filters . The filter classes all accept another compatible stream object as a parameter to the constructor and decorate the enclosed stream with additional features. Filters are created by extending one of the base filter classes FilterInputStream , FilterOutputStream , FilterReader , or FilterWriter . The Reader and Writer classes are really just byte streams with additional processing performed on
765-489: Is different from Wikidata All article disambiguation pages All disambiguation pages Abstract Window Toolkit The Abstract Window Toolkit ( AWT ) is Java 's original platform-dependent windowing , graphics , and user-interface widget toolkit , preceding Swing . The AWT is part of the Java Foundation Classes (JFC) — the standard API for providing a graphical user interface (GUI) for
810-543: Is inherently 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 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. Where there is a Swing version of an AWT component it will begin with J- and should be used exclusively, replacing
855-456: Is known as a "strong reference". The java.lang.ref package defines three other types of references—soft, weak , and phantom references. Each type of reference is designed for a specific use. Each of these reference types extends the Reference class, which provides the get() method to return a strong reference to the referent object (or null if the reference has been cleared or if
900-510: Is the Collections API , an organized data structure hierarchy influenced heavily by the design patterns considerations. Created to support Java applet creation, the java.applet package lets applications be downloaded over a network and run within a guarded sandbox. Security restrictions are easily imposed on the sandbox. A developer, for example, may apply a digital signature to an applet, thereby labeling it as safe. Doing so allows
945-703: The Java programming language and is part of the Java software-platform family. Java SE defines a range of general-purpose APIs —such as Java APIs for the Java Class Library —and also includes the Java Language Specification and the Java Virtual Machine Specification . OpenJDK is the official reference implementation since version 7. The platform was known as Java 2 Platform, Standard Edition or J2SE from version 1.2, until
SECTION 20
#1732852588665990-538: The Java Community Process , which produces descriptions of proposed and final specifications for the Java platform called Java Specification Requests (JSR) . JSR 59 was the umbrella specification for J2SE 1.4 and JSR 176 specified J2SE 5.0 (Tiger). Java SE 6 (Mustang) was released under JSR 270. Java Platform, Enterprise Edition (Java EE) is a related specification that includes all the classes in Java SE, plus
1035-535: The Java Virtual Machine (JVM) garbage collector . It is an important package, central enough to the language for the language designers to give it a name that starts with "java.lang", but it is somewhat special-purpose and not used by a lot of developers. This package was added in J2SE 1.2. Java has an expressive system of references and allows for special behavior for garbage collection. A normal reference in Java
1080-496: The AWT version. For example, in Swing, only use JButton, never Button class. As mentioned above, the AWT core classes, such as Color and Font, are still used as-is in Swing. When drawing in Swing, use JPanel and override paintComponent(Graphics g) instead of using the AWT paint() methods. Before Java 6 Update 12 , mixing Swing components and basic AWT widgets often resulted in undesired side effects, with AWT widgets appearing on top of
1125-576: The GUI can imitate those from the underlying native system. Design patterns permeate the system, especially a modification of the model–view–controller pattern, which loosens the coupling between function and appearance. One inconsistency is that (as of J2SE 1.3) fonts are drawn by the underlying native system, and not by Java, limiting text portability. Workarounds, such as using bitmap fonts, do exist. In general, "layouts" are used and keep elements within an aesthetically consistent GUI across platforms. The javax.swing.text.html.parser package provides
1170-525: The JVM has about the program. There are basic techniques involved in reflection: Discovery typically starts with an object and calling the Object.getClass() method to get the object's Class . The Class object has several methods for discovering the contents of the class, for example: The Class object can be obtained either through discovery, by using the class literal (e.g. MyClass.class ) or by using
1215-620: The Java application. It also provides several basic layout managers , a datatransfer package for use with the Clipboard and Drag and Drop , the interface to input devices such as mice and keyboards , as well as access to the system tray on supporting systems. This package, along with javax.swing contains the largest number of enums (7 in all) in JDK 6. The java.rmi package provides Java remote method invocation to support remote procedure calls between two java applications running in different JVMs . Support for security, including
1260-419: The Swing widgets regardless of their defined z-order . This problem was because the rendering architecture of the two widget toolkits was very different, despite Swing borrowing heavyweight top containers from AWT. Starting in Java 6 Update 12 , it is possible to mix Swing and AWT widgets without having z-order problems. As the AWT is a bridge to the underlying native user-interface, its implementation on
1305-439: The actual files downloaded and installed on a computer to run or develop Java programs, respectively. The Java package java.lang contains fundamental classes and interfaces closely tied to the language and runtime system. This includes the root classes that form the class hierarchy , types tied to the language definition, basic exceptions , math functions, threading , security functions, as well as some information on
1350-428: The character encoding to use. If no encoding is specified, the program uses the default encoding for the platform. The following table shows the other processes and filters that the java.io package directly supports. All these classes extend the corresponding Filter class. The RandomAccessFile class supports random access reading and writing of files. The class uses a file pointer that represents
1395-400: The creation, deletion and renaming of files and directories and the manipulation of file attributes such as read-only and last modified timestamp . File objects that represent directories can be used to get a list of all the contained files and directories. The FileDescriptor class is a file descriptor that represents a source or sink (destination) of bytes. Typically this is
AWT - Misplaced Pages Continue
1440-577: The data stream to convert the bytes to characters. They use the default character encoding for the platform, which as of J2SE 5.0 is represented by the Charset returned by the java.nio.charset.Charset.defaultCharset() static method. The InputStreamReader class converts an InputStream to a Reader and the OutputStreamWriter class converts an OutputStream to a Writer . Both these classes have constructors that support specifying
1485-610: The feature and StreamType is one of InputStream , OutputStream , Reader , or Writer . The following table shows the sources/destinations supported directly by the java.io package: Other standard library packages provide stream implementations for other destinations, such as the InputStream returned by the java.net.Socket.getInputStream() method or the Java EE javax.servlet.ServletOutputStream class. Data type handling and processing or filtering of stream data
1530-447: The local graphics subsystem) instead of relying on the operating system's high-level user interface module. Swing provides the option of using either the native platform's "look and feel" or a cross-platform look and feel (the "Java Look and Feel") that looks the same on all windowing systems. The AWT provides two levels of APIs : AWT also makes some higher level functionality available to applications, such as: Neither AWT nor Swing
1575-527: The message digest algorithm, is included in the java.security package. An implementation of the JDBC API (used to access SQL databases ) is grouped into the java.sql package. The javax.rmi package provided support for the remote communication between applications, using the RMI over IIOP protocol. This protocol combines RMI and CORBA features. Java SE Core Technologies - CORBA / RMI-IIOP Swing
1620-525: The name of the class (e.g. Class.forName("mypackage.MyClass") ). With a Class object, member Method , Constructor , or Field objects can be obtained using the symbolic name of the member. For example: Method , Constructor , and Field objects can be used to dynamically access the represented member of the class. For example: The java.lang.reflect package also provides an Array class that contains static methods for creating and manipulating array objects, and since J2SE 1.3,
1665-552: The name was changed to Java Platform, Standard Edition or Java SE in version 1.5. The "SE" is used to distinguish the base platform from the Enterprise Edition ( Java EE ) and Micro Edition ( Java ME ) platforms. The "2" was originally intended to emphasize the major changes introduced in version 1.2, but was removed in version 1.6. The naming convention has been changed several times over the Java version history . Starting with J2SE 1.4 (Merlin), Java SE has been developed under
1710-450: The package are primarily stream-oriented ; however, a class for random access files is also provided. The central classes in the package are InputStream and OutputStream , which are abstract base classes for reading from and writing to byte streams , respectively. The related classes Reader and Writer are abstract base classes for reading from and writing to character streams, respectively. The package also has
1755-410: The package are: The java.net package provides special IO routines for networks, allowing HTTP requests, as well as other common transactions. The java.text package implements parsing routines for strings and supports various human-readable languages and locale-specific parsing. Data structures that aggregate objects are the focus of the java.util package. Included in the package
1800-419: The public members of a target object (based on its runtime class) or the members declared by a given class. This package was added in JDK 1.1. Reflection is used to instantiate classes and invoke methods using their names, a concept that allows for dynamic programming. Classes, interfaces, methods, fields , and constructors can all be discovered and used at runtime. Reflection is supported by metadata that
1845-472: The reference type is phantom), and the clear() method to clear the reference. The java.lang.ref also defines the class ReferenceQueue , which can be used in each of the applications discussed above to keep track of objects that have changed reference type. When a Reference is created it is optionally registered with a reference queue. The application polls the reference queue to get references that have changed reachability state. Reflection
AWT - Misplaced Pages Continue
1890-477: The second parameter is the Method object representing the method from the interface implemented by the proxy, and the third parameter is the array of parameters passed to the interface method. The invoke() method returns an Object result that contains the result returned to the code that called the proxy interface method. The java.io package contains classes that support input and output . The classes in
1935-418: The underlying native subroutine that created a check box. However, the check box on Windows is not the same as the check box on macOS or on the various types of Unix . Some application developers prefer this model because it provides a high degree of fidelity to the underlying native windowing toolkit and seamless integration with native applications. In other words, a GUI program written using AWT looks like
1980-401: The underlying native system. This package contains 22 of 32 Error classes provided in JDK 6. The main classes and interfaces in java.lang are: Classes in java.lang are automatically imported into every source file . The java.lang.ref package provides more flexible types of references than are otherwise available, permitting limited interaction between the application and
2025-620: The user to grant the applet permission to perform restricted operations (such as accessing the local hard drive), and removes some or all the sandbox restrictions. Digital certificates are issued by certificate authorities . Included in the java.beans package are various classes for developing and manipulating beans, reusable components defined by the JavaBeans architecture . The architecture provides mechanisms for manipulating properties of components and firing events when those properties change. The APIs in java.beans are intended for use by
#664335