Computer Science 523
Advanced Programming
Summer 2014, The College of Saint Rose
ManyJLabels Demo
A working demo of ManyJLabels will appear below. Click inside the applet to interact with it.
ManyJLabels BlueJ Project
Click here to download a BlueJ project for ManyJLabels.
ManyJLabels Source Code
The Java source code for ManyJLabels is below. Click on a file name to download it.
/* * Example ManyJLabels: where do multiple GUI components go * if we just add them all? * * Jim Teresco, The College of Saint Rose, CSC 523, Summer 2014 * * $Id: ManyJLabels.java 2379 2014-06-17 03:52:55Z terescoj $ */ import javax.swing.JApplet; import javax.swing.JLabel; public class ManyJLabels extends JApplet { public void init() { // in this example, we'll just add a series of JLabels // to our JApplet window add(new JLabel("1) I know Java is fun.")); add(new JLabel("2) I'm gettting good at applications.")); add(new JLabel("3) I expect GUIs will be good too.")); add(new JLabel("4) I wish they had buttons and stuff, though.")); } }