© Kishori Sharan 2018
Kishori SharanJava APIs, Extensions and Librarieshttps://doi.org/10.1007/978-1-4842-3546-1_1

1. Introduction to Swing

Kishori Sharan1 
(1)
Montgomery, Alabama, USA
 
In this chapter, you will learn:
  • What Swing is

  • The difference between a character-based interface and a graphical user interface

  • How to develop the simplest Swing program

  • What a JFrame is and how it is made up of different components

  • How to add components to a JFrame

  • What a layout manager is and the different types of layout managers in Swing

  • How to create reusable frames

  • How to handle events

  • How to handle mouse events and how to use the adapter class to handle mouse events

All example programs in this chapter are members of a jdojo.swing.intro module, as declared in Listing ...

Get Java APIs, Extensions and Libraries: With JavaFX, JDBC, jmod, jlink, Networking, and the Process API now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.