import javax.swing.*; - PowerPoint PPT Presentation

About This Presentation
Title:

import javax.swing.*;

Description:

applet code=Check width=50 height=70 /applet /html import javax.swing.*; public class Check extends JApplet ... import javax.swing.*; import java.awt. ... – PowerPoint PPT presentation

Number of Views:62
Avg rating:3.0/5.0
Slides: 5
Provided by: peoplefr
Category:
Tags: import | javax | swing

less

Transcript and Presenter's Notes

Title: import javax.swing.*;


1
import 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)
2
file 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
3
import 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)

4
import 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)
Write a Comment
User Comments (0)
About PowerShow.com