Source: http://lig-membres.imag.fr/genoud/ENSJAVA/cours/supportsPDF/IntroSwing_2pp.pdf