Lecture 17 - GUI - GUI Basics and Event Handling Java...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Java provides support for building GUIs with the Abstract Window Toolkit (AWT) and the newer Swing component set o Are in the packages java.awt and javax.swing o Are designed to be platform independent AWT provides: o Heavyweight components o Layout Managers o Events and Listeners Swing provides: o Lightweight components o Some new Layout Managers o Some new Events and Listeners Swing does not completely replace the AWT, but builds on some of its functionality o Swing’s visual components have suspended those of the AWT o Other parts of the AWT will still be used Eg: events, layout managers Do not mix AWT and Swing visual components o Your program won’t work if you try this To use Swing, you must use JDK 1.2 or later Java GUI Elements The key elements are: o Components Also known as user interface controls, or widgets Includes labels, buttons, text fields, scrollbars, etc. o
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/04/2010 for the course CPSC 233 taught by Professor Li during the Fall '09 term at University of Calgary.

Page1 / 4

Lecture 17 - GUI - GUI Basics and Event Handling Java...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online