




















































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
An introduction to java's graphical user interface (gui) features, focusing on swing and awt components, layout managers, and event handling. It covers the differences between lightweight and heavyweight components, the disadvantages of awt, and the three main steps to creating a gui. The document also demonstrates how to create an application window, add components, and register event listeners using swing.
Typology: Slides
1 / 60
This page cannot be seen from the preview
Don't miss anything!
Objectives
continued Docsity.com
listeners (waiting code)
events (info. objects) components
layout manager
window is done with layout managers
continued Docsity.com
use Swing
continued Docsity.com
Using the Substance L&F add-on library (https://substance.dev.java.net/)
title
content pane
window controls
Implemented by subclassing JFrame
public class ImageViewer extends JFrame { public ImageViewer() { super("ImageViewer 0.1");
// create the GUI Container c = getContentPane(); JLabel label = new JLabel ("I am a label. I can display some text."); c.add(label); :
JLabel is a GUI component
Version 0.