Chapter 2 - Java Applet
Chapter 2 - Java Applet
import javax.swing.*;
public class DisplayLabel extends JApplet {
public DisplayLabel() {
add(new JLabel("Great!", JLabel.CENTER));
}
}
Working with JApplet
Components
Using Japplets you can do the following:
o Change the font and color of labels.
o Use layout managers.
o Add multiple GUI components.
o Change the background color.
o Add listeners for user events.
o Add images and sounds.
example