Open all | Close all
|
Simple Swing Java Applet
Below you will find the Java code for creating a simple Swing applet. Next step is to add and applet to your
webpage. Unfortunatly i am not sure how this is done and if anyone can let me know i would be very
gratefull.
|
The Java code for the above applet:
import java.awt.*;
import javax.swing.*;
public class helloWorldSwing extends JApplet {
JLabel valueLabel;
public void init() {
Container container = getContentPane();
container.setLayout(new FlowLayout());
valueLabel = new JLabel("Hello World", Label.LEFT);
container.add(valueLabel);
}
}
|
|
|