Title: import javax.swing.*;
1import javax.swing. class Check public
static void main(String args) JFrame
frame new JFrame("Check")
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOS
E)//DO_NOTHING_ON_CLOSE
frame.setSize(600,500)
frame.setVisible(true)
2file Check.java import javax.swing. public
class Check extends Japplet file
Stam.html lthtmlgt An example of an applet ltapplet
codeCheck width50 height70gt lt/appletgt lt/htmlgt
3import javax.swing. public class Check extends
JApplet //... public static void
main(String args) JApplet applet
new Check() JFrame frame new
JFrame("Check") frame.setDefaultCloseOper
ation(JFrame.EXIT_ON_CLOSE)
frame.getContentPane().add(applet)
frame.setSize(50, 70) applet.init()
applet.start() frame.setVisible(true)
4import javax.swing. import java.awt. // for
FlowLayout class Check public static void
main(String args) JFrame frame new
JFrame("Check") frame.setDefaultCloseOper
ation(JFrame.EXIT_ON_CLOSE) frame.getContentPane
().setLayout(new FlowLayout()) frame.getContentP
ane().add(new JButton("One")) frame.getContentP
ane().add(new JButton("Two"))
frame.setSize(600,500)
frame.setVisible(true)