Java applet
Applications
Applets
Java
Widgets
Import java.io.*
Import java.applet.*;
Import java.awt.*;
Import java.awt.event.*;
Import java.io.*;
Import java.applet.*;
Import java.awt.*;
Import java.awt.event.*;
Label
Button
Textfield
All of these
Transient
Package
Interface
Gotoxy
Import java.io.*
Import java.applet.*;
Import java.awt.*;
Import java.awt.event.*;
Public
Import
Implement
Package
Public
Void
Class
Static
Import java.io.*;
Import java.applet.*;
Import java.awt.*;
Import java.awt.event.*;
Transient
Package
Interface
Gotoxy
G.Drawrect();
G.drawRect();
G.drawingRect();
G.draw_RECT();
(String, int x, int y)
(String, int y, int x)
(int x, int y, String)
(int x, String, int y)
Public
Import
Implement
Package
SetColor()
Graphics
Color
Paint
Public
Void
Class
Static
”Welcome to Java!”
140
50
None of these
G.Drawrect();
G.drawRect();
G.drawingRect();
G.draw_RECT();
Start()
Stop()
Destroy()
Wait()
(String, int x, int y)
(String, int y, int x)
(int x, int y, String)
(int x, String, int y)
Start()
Init()
Draw()
Paint()
SetColor()
Graphics
Color
Paint
”Welcome to Java!”
140
50
None of these
It avoids confusion in displaying strings in applet.
You would not need to change and recompile the applet every time you changed the messages.
You would not need to change your html code every time you changed the messages.
It makes your program a lot easier to manage than usual.
Start()
Stop()
Destroy()
Wait()
Start()
Init()
Draw()
Paint()
Paint
Color
Draw
Graphics
(int x, int y, int width, int height, int start angle, int size of angle)
(int x, int y, int width, int height, int size of angle, int end angle)
(int x, int y, int height, int width, int size of angle 1, int size of angle 2)
(int width, int height ,int x, int y, int size of angle 1, int size of angle 2)
It avoids confusion in displaying strings in applet.
You would not need to change and recompile the applet every time you changed the messages.
You would not need to change your html code every time you changed the messages.
It makes your program a lot easier to manage than usual.
You can specify whole numbers only
You can declare four parameters only
You can declare negative numbers
You can declare decimal values.
Paint
Color
Draw
Graphics
GetColor()
ChangeColor()
SetColor()
InventColor()
(int x, int y, int width, int height, int start angle, int size of angle)
(int x, int y, int width, int height, int size of angle, int end angle)
(int x, int y, int height, int width, int size of angle 1, int size of angle 2)
(int width, int height ,int x, int y, int size of angle 1, int size of angle 2)
DrawLinear()
DrawBorder()
DrawLine()
FillLine()
You can specify whole numbers only
You can declare four parameters only
You can declare negative numbers
You can declare decimal values.
SetBackground()
SetForeground()
SetFont()
SetAlignment()
GetColor()
ChangeColor()
SetColor()
InventColor()
It provides a single line of text only.
You cannot change the font style.
You cannot change the font size.
You cannot include background image
DrawLinear()
DrawBorder()
DrawLine()
FillLine()
Label sample = new Label();
Label sample = new Label(“text of label”);
Label sample = new Label(“text of label”, Label.setText());
Label sample = new Label(“text of label”, Label.RIGHT);
SetBackground()
SetForeground()
SetFont()
SetAlignment()
ActionEvent
ActionListener
ActionPerformed
ActionImplement
It provides a single line of text only.
You cannot change the font style.
You cannot change the font size.
You cannot include background image
AddActionListener
ActionPerformed
ActionEvent
ActionListener
Label sample = new Label();
Label sample = new Label(“text of label”);
Label sample = new Label(“text of label”, Label.setText());
Label sample = new Label(“text of label”, Label.RIGHT);
Text class
Textlabel
Textarea
Textfield
Graphics
String
Draw
Applet
ActionEvent
ActionListener
ActionPerformed
ActionImplement
GetValue
SetText
FillText
SetValue
AddActionListener
ActionPerformed
ActionEvent
ActionListener
Adds two integers
Adds two numbers of any data type
Places a component within an Applet window screen
Places a value in a variable.
Text class
Textlabel
Textarea
Textfield
SetLocation()
GetLocation()
ChangeLocation()
Locate()
Graphics
String
Draw
Applet
Language
Typeface
Style
Size
GetValue
SetText
FillText
SetValue
An unlabeled textfield
A textfield with a “4” in it.
A textfield four pixels wide
A textfield four characters wide
Adds two integers
Adds two numbers of any data type
Places a component within an Applet window screen
Places a value in a variable.
SetLocation()
GetLocation()
ChangeLocation()
Locate()
An event-driven
A procedural
A random
Any java
Language
Typeface
Style
Size
SetSize()
GetSize()
ChangeSize()
Resize()
An unlabeled textfield
A textfield with a “4” in it.
A textfield four pixels wide
A textfield four characters wide
Are compiled using the javac command.
Are executed using the java command
Are executed from within an HTML document
Have a main() method.
An event-driven
A procedural
A random
Any java
Dot
Forward slash
Backslash
Colon
SetSize()
GetSize()
ChangeSize()
Resize()
.exe
.code
.java
.class
Are compiled using the javac command.
Are executed using the java command
Are executed from within an HTML document
Have a main() method.
Components
Containers
Siblings
Family
Dot
Forward slash
Backslash
Colon
Search engine
Compiler
Browser
Notepad
.exe
.code
.java
.class
ButtonPressed()
AddActionListener()
Start()
ActionPerformed()
TextComponent
TextBox
Text
TextValue
Components
Containers
Siblings
Family
Font aFont = new Font(“Helvetica”, Font.ITALIC, 20);
Font aFont = new Font(26, “Times New Roman”, Font.ITALIC);
Font aFont = new Font(Font.BOLD ,“Helvetica”, , 20);
Font aFont = new Font(18, Font.BOLD, “Comic Sans”);
Search engine
Compiler
Browser
Notepad
Red, Orange, Green
Blue, Green, Yellow
Red, Green, Blue
Black, White and Blue
ButtonPressed()
AddActionListener()
Start()
ActionPerformed()
DrawCircle()
DrawCircular()
DrawOval()
DrawArc()
TextComponent
TextBox
Text
TextValue
A drawRect method with 4 parameters.
A fillArc method with 6 parameters.
A drawArc method with 4 parameters
A fillRect method with 4 parameters
Font aFont = new Font(“Helvetica”, Font.ITALIC, 20);
Font aFont = new Font(26, “Times New Roman”, Font.ITALIC);
Font aFont = new Font(Font.BOLD ,“Helvetica”, , 20);
Font aFont = new Font(18, Font.BOLD, “Comic Sans”);
Destructed
Destroyed
Damaged
Overlapped
Red, Orange, Green
Blue, Green, Yellow
Red, Green, Blue
Black, White and Blue
Measured in pixels
Measured in inches
In decimal places
In float type
DrawCircle()
DrawCircular()
DrawOval()
DrawArc()
Stand-alone program
Web pages
Called from within another application
Written in HTML
A drawRect method with 4 parameters.
A fillArc method with 6 parameters.
A drawArc method with 4 parameters
A fillRect method with 4 parameters
Destructed
Destroyed
Damaged
Overlapped
Public
Import
Implements
Package
Measured in pixels
Measured in inches
In decimal places
In float type
GetParam()
GetParameter()
SetParam()
SetParameter()
Stand-alone program
Web pages
Called from within another application
Written in HTML
Public
Import
Implements
Package
GetParam()
GetParameter()
SetParam()
SetParameter()