Swing

Hello World

The two following examples give the same result, but using two different implementations for handling the action event on the button :
  1. In this version , the main class implements ActionListener and then, is used as instance of ActionListener to listen the button.
  2. In this version, the instance of ActionListener is done using an anonymous inner class.

SwingApplication

This example of a simple application is coming from the Java tutorial.

Coordinates Demo

This example, which explains how to draw in a componant, is coming from the Java tutorial.

Layout Demos

These examples are coming from the Java tutorial. Most useful layout managers are (in my opinion) :

Browser

This example shows how to implement a simple web browser. In particular, it contains a generic history.