Awt awt is fine for developing simple graphical user

Info icon This 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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern