Awt awt is fine for developing simple graphical user

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ped to the platform-specific components through platformtheir respective agents, known as peers. AWT AWT is fine for developing simple graphical user interfaces, but not for developing comprehensive GUI projects. Besides, Besides, AWT is prone to platform-specific bugs because its peer-based approach platformpeerrelies heavily on the underlying platform. With With the release of Java 2, the AWT user-interface components were replaced by a usermore robust, versatile, and flexible library known as Swing components. components. Swing Swing components are painted directly on canvases using Java code, except for components that are the subclasses of java.awt.Window or java.awt.Panel, which must be drawn using native GUI on a specific platform. Swing Swing components are less dependent on the target platform and use less of the native GUI resource. For this reason, Swing components that don’t rely on native GUI are referred to as lightweight components, and AWT components are referred to as components, heavyweight components. components. EE3206/EE5805 Java Programming & Applications 4 Heavyweight Heavyweight (AWT) vs. Lightweight (Swing) Dimension Font FontMetrics Object Color Graphics Component * LayoutManager 1 Classes in the java.awt package Heavyweight Panel Applet JApplet Container Window Frame Dialog JFrame JDialog JComponent Swing Components in the javax.swing package Lightweight EE3206/EE5805 Java Programming & Applications 5 GUI GUI Container Classes Dimension Font FontMetrics Object Color Graphics Component * LayoutManager 1 Classes in the java.awt package 1. Container classes can contain other GUI components. 2. Top-level Swing containers such as JFrame, JDialog, and JApplet -- are sp...
View Full Document

This note was uploaded on 04/20/2010 for the course ELECTRONIC EE3206 taught by Professor Tingchiwang during the Spring '10 term at École Normale Supérieure.

Ask a homework question - tutors are online