Exforsys.com
 
Home Tech Articles J2EE
 

Swing: A Quick Tutorial for AWT Programmers

 
Swing" refers to the new library of GUI controls (buttons, sliders, checkboxes, etc.) that replaces the somewhat weak and inflexible AWT controls. This tutorial is aimed at getting Java programmers who already know the AWT going as quickly as possible in Swing.


 Note: An updated and expanded version of this material appears in .

 

 

 

 

 

 

 

 

 

Expanded Table of Contents

Introductory Material

· Introduction & and Extended Table of Contents (This page)

· Swing Overview

o Main New Features

o Swing Availability

o Getting More Info

o Main Differences in Use

o Mixing AWT and Swing Components (don't!)

Using Top-Level Containers

· JApplet

o General Info

o Differences from Applet

o Example

· JFrame

o General Info

o Differences from Frame

o Example

· Look & Feel

o LAF Availability

o Specifying Native LAF

o Examples

Simple Swing Components

· JLabel

o Basics

o New Features: Images, Borders, and HTML Content

o Example

· JButton

o Basics

o New Features: Icons, Alignment, Mnemonics, and HTML Content

o Example

· JPanel

o Basics

o New Features: Borders

o Example

· JSlider

o Basics

o New Features: Tick Marks and Labels

o Example

· JColorChooser

o Basics

o Example

Simple Swing Components, continued

· Internal Frames

o Basics

o Example

· Alert Dialogs (JOptionPane)

o Basics

o Confirm Dialog Examples

o Message Dialog Examples

o Interactive Dialog Creator

· JToolBar

o Basics

o Making Buttons for Toolbars

o Example

· JEditorPane

o Basics: Displaying HTML

o Following Hypertext Links

o Building A Simple Web Browser

o HTML Support and JavaHelp

· Other Simple Components

o JLabel

o JCheckBox

o JRadioButton

o JFileChooser

o JTextField

o JTextArea

Complex Swing Components

· JList

o General Info on MVC, Custom Data Models, and Custom Cell Renderers

o JList with Fixed Set of Choices

o JList with Changeable Choices

o JList with Custom Data Model

o JList with Custom Renderer

· JTree

o Basic JTree

o Handling JTree Events

o Custom Models and Dynamic JTrees

o Changing the Node Icons

Other Swing Capabilities

· Printing

o Background

o Printing Basics

o The Role of Double Buffering

o A General-Purpose Component-Printing Routine

o Example


Read Next: Java Data Structures (2nd edition)



 

 

Comments



Post Your Comment:

Members Please Login
Your Name:*
e-mail ID:(required for notification)*
Image Verification: 
 
 Subscribe    

Sponsored Links

 

Subscribe via RSS


Get Daily Updates via Subscribe to Exforsys Free Training via email


Get Latest Free Training Updates delivered directly to your Inbox...

Enter your email address:


 

Subscribe to Exforsys Free Training via RSS
 

 
Partners -  Privacy and Legal Policy -  Site News -  Contact   Sitemap  

Copyright © 2000 - 2010 exforsys.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape