An applet is a small Java program that runs in a web browser. It allows for interactive graphics and animation to be embedded in HTML pages. Applets differ from standalone Java applications in that they have no main method and run within the context of a web page. The lifecycle of an applet involves initialization, starting, stopping, and destruction as the user interacts with the web page. Parameters can be passed to applets using the <param> tag in HTML. The applet code uses methods like init(), paint(), start(), and stop() to control its execution and display output.
UNIT – 4
PART I
APPLET
APPLETS - GUI COMPONENTS
APPLET PARAMETERS
LIFE CYCLE OF AN APPLET
APPLICATION CONVERSION TO APPLETS
AWT AND AWT HIERARCHY
SWING COMPONENTS
UNIT – 4
PART I
APPLET
APPLETS - GUI COMPONENTS
APPLET PARAMETERS
LIFE CYCLE OF AN APPLET
APPLICATION CONVERSION TO APPLETS
AWT AND AWT HIERARCHY
SWING COMPONENTS
Literature Review Basics and Understanding Reference Management.pptxDr Ramhari Poudyal
Three-day training on academic research focuses on analytical tools at United Technical College, supported by the University Grant Commission, Nepal. 24-26 May 2024
Water billing management system project report.pdfKamal Acharya
Our project entitled “Water Billing Management System” aims is to generate Water bill with all the charges and penalty. Manual system that is employed is extremely laborious and quite inadequate. It only makes the process more difficult and hard.
The aim of our project is to develop a system that is meant to partially computerize the work performed in the Water Board like generating monthly Water bill, record of consuming unit of water, store record of the customer and previous unpaid record.
We used HTML/PHP as front end and MYSQL as back end for developing our project. HTML is primarily a visual design environment. We can create a android application by designing the form and that make up the user interface. Adding android application code to the form and the objects such as buttons and text boxes on them and adding any required support code in additional modular.
MySQL is free open source database that facilitates the effective management of the databases by connecting them to the software. It is a stable ,reliable and the powerful solution with the advanced features and advantages which are as follows: Data Security.MySQL is free open source database that facilitates the effective management of the databases by connecting them to the software.
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...ssuser7dcef0
Power plants release a large amount of water vapor into the
atmosphere through the stack. The flue gas can be a potential
source for obtaining much needed cooling water for a power
plant. If a power plant could recover and reuse a portion of this
moisture, it could reduce its total cooling water intake
requirement. One of the most practical way to recover water
from flue gas is to use a condensing heat exchanger. The power
plant could also recover latent heat due to condensation as well
as sensible heat due to lowering the flue gas exit temperature.
Additionally, harmful acids released from the stack can be
reduced in a condensing heat exchanger by acid condensation. reduced in a condensing heat exchanger by acid condensation.
Condensation of vapors in flue gas is a complicated
phenomenon since heat and mass transfer of water vapor and
various acids simultaneously occur in the presence of noncondensable
gases such as nitrogen and oxygen. Design of a
condenser depends on the knowledge and understanding of the
heat and mass transfer processes. A computer program for
numerical simulations of water (H2O) and sulfuric acid (H2SO4)
condensation in a flue gas condensing heat exchanger was
developed using MATLAB. Governing equations based on
mass and energy balances for the system were derived to
predict variables such as flue gas exit temperature, cooling
water outlet temperature, mole fraction and condensation rates
of water and sulfuric acid vapors. The equations were solved
using an iterative solution technique with calculations of heat
and mass transfer coefficients and physical properties.
Online aptitude test management system project report.pdfKamal Acharya
The purpose of on-line aptitude test system is to take online test in an efficient manner and no time wasting for checking the paper. The main objective of on-line aptitude test system is to efficiently evaluate the candidate thoroughly through a fully automated system that not only saves lot of time but also gives fast results. For students they give papers according to their convenience and time and there is no need of using extra thing like paper, pen etc. This can be used in educational institutions as well as in corporate world. Can be used anywhere any time as it is a web based application (user Location doesn’t matter). No restriction that examiner has to be present when the candidate takes the test.
Every time when lecturers/professors need to conduct examinations they have to sit down think about the questions and then create a whole new set of questions for each and every exam. In some cases the professor may want to give an open book online exam that is the student can take the exam any time anywhere, but the student might have to answer the questions in a limited time period. The professor may want to change the sequence of questions for every student. The problem that a student has is whenever a date for the exam is declared the student has to take it and there is no way he can take it at some other time. This project will create an interface for the examiner to create and store questions in a repository. It will also create an interface for the student to take examinations at his convenience and the questions and/or exams may be timed. Thereby creating an application which can be used by examiners and examinee’s simultaneously.
Examination System is very useful for Teachers/Professors. As in the teaching profession, you are responsible for writing question papers. In the conventional method, you write the question paper on paper, keep question papers separate from answers and all this information you have to keep in a locker to avoid unauthorized access. Using the Examination System you can create a question paper and everything will be written to a single exam file in encrypted format. You can set the General and Administrator password to avoid unauthorized access to your question paper. Every time you start the examination, the program shuffles all the questions and selects them randomly from the database, which reduces the chances of memorizing the questions.
TOP 10 B TECH COLLEGES IN JAIPUR 2024.pptxnikitacareer3
Looking for the best engineering colleges in Jaipur for 2024?
Check out our list of the top 10 B.Tech colleges to help you make the right choice for your future career!
1) MNIT
2) MANIPAL UNIV
3) LNMIIT
4) NIMS UNIV
5) JECRC
6) VIVEKANANDA GLOBAL UNIV
7) BIT JAIPUR
8) APEX UNIV
9) AMITY UNIV.
10) JNU
TO KNOW MORE ABOUT COLLEGES, FEES AND PLACEMENT, WATCH THE FULL VIDEO GIVEN BELOW ON "TOP 10 B TECH COLLEGES IN JAIPUR"
https://www.youtube.com/watch?v=vSNje0MBh7g
VISIT CAREER MANTRA PORTAL TO KNOW MORE ABOUT COLLEGES/UNIVERSITITES in Jaipur:
https://careermantra.net/colleges/3378/Jaipur/b-tech
Get all the information you need to plan your next steps in your medical career with Career Mantra!
https://careermantra.net/
2. Introduction
• There are two kinds of Java programs-
–Applications (stand-alone programs)
–Applets.
• An Applet is a small Internet-based program that
has the Graphical User Interface (GUI), written in
the Java programming language.
3. Introduction
• A Java applet is a small application written in
Java and delivered to users in the form
of bytecode.
• A applet is typically embedded in a Web page
and can be run from a browser.
• Applets can be transported over the Internet
from one computer to another.
4. How applet differ from application
• Applets are the small programs, applications are
larger programs.
• Applets don't have the main method while in an
application execution starts with the main
method.
• Applications run independently while Applets
cannot. They run from inside the web page.
• Applets cannot read from or write to the files in
the local computer.
5. Introduction
• An applet can perform
–arithmetic operation,
–display graphics,
–play sounds,
–accept user input,
–create animation and
–play interactive games.
6. Local and Remote Applets
• We can embed applets into web pages in
two ways-
1. Create our own applets ( Local )
2. Download an applet from remote computer
system (Remote Applet )
7. Local Applet
• An applet developed locally and stored in local
system is known as local applet.
• When a web page trying to find a local applet, it
does not need to use the Internet.
• It simply searches the directories in the local
system and locates and loads the specified
applet. local applet
8. Remote Applet
• A remote applet is that which is developed by
someone else and stored on the remote
computer connected to internet.
• Users can download the remote applet onto
there system and run it.
Local Computer Remote Computer
Internet
9. Steps involved in developing applets
1. Building an applet code (. java file )
2. Creating an executable applet ( .class file )
3. Designing a Web Page using HTML tags.
4. Preparing <APPLET> tag.
5. Incorporating <APPLET> tag into the Web
Page.
6. Creating HTML file.
7. Testing the Applet Code.
10. Building Applet Code
• It is essential that applet code uses services of
two classes
–Applet class and
–Graphics class.
11. Chain of classes inherited by Applet class
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----java.applet.Applet
12. The Applet Class
• The java.applet package is the smallest package
in Java API.
• The Applet class is the only class in the package.
• The Applet class provides life and behaviour to
applet through its methods.
• The Applet class has many methods that are used
to display images, play audio files etc but it has
no main() method.
13. Methods of Applet Class
• init() :
– used for whatever initializations are needed for
applet.
– Applets can have a default constructor, but it is better
to perform all initializations in the init method
instead of the default constructor.
• start() :
– This method is automatically called after Java calls
the init method.
14. • stop() :
– This method is automatically called when the user
moves off the page where the applet sits.
• destroy():
– Java calls this method when the browser shuts
down.
15. paint() Method of Applet Class
• Paint method actually displays the result of applet
code on the screen.
• The output may be text, graphics, or sound.
• Syntax-
public void paint(Graphics g)
• The paint method requires graphics object as an
argument.
• Hence we require to import Graphics class from
java.awt package.
16. Applet Life Cycle
Born
Running Idle
Dead End
Stopped
Destroyed
Exit browser
Begin
(Load applet) Initialization
Display
paint()
start()
stop()
start()
destroy()
Applet state transition diagram
17. Born or Initialization State
• An applet begins its life when the web browser
loads its classes and calls its init() method.
• This is called exactly once in Applets lifecycle.
• init() method provides initialization code such as
initialization of variables, loading images or
fonts.
Eg.
public void init()
{
//initialization
18. Running State
• Once the initialization is complete, the web
browser will call the start() method in the applet.
• This method must called atleast once in the
Applets lifecycle.
• The start() method can also be called if the
Applet is in “Idle” state.
Eg. public void start()
{
//Code
}
19. Stopped State
• The web browser will call the Applets stop()
method, if the user moved to another web page
while the applet was executing.
• The stop() method is called atleast once in
Applets Lifecycle.
Eg. public void stop()
{
//Code
}
20. Dead State
• Finally, if the user decides to quit the web
browser, the web browser will free up system
resources by killing the applet before it closes.
• To do so, it will call the applets destroy()
method.
Eg.
public void destroy()
{
// Code
}
21. Display State
• Applet moves to the display state whenever it
has to perform the output operations on the
screen.
• This happens immediately after the applet
enters into the running state.
• The paint() method is called to accomplish this
task.
Eg.
public void paint(Graphics g)
{
//Display Statements
22. General format of Applet Code
import java.awt.*;
import java.applet.*;
……………………
public class applet_class_name extends Applet
{ ……………
public void paint(Graphics g)
{
………….//applet operation code
}
}
24. Designing a Web Page
• To execute an applet in a web browser, write a
short HTML text file that contains the
appropriate APPLET tag.
• For above example it is
<html>
<body>
<applet code="SimpleApplet.class" width=200
height=100>
</applet>
</body>
</html>
25. The Applet tag
<applet
[codebase=codebaseURL]
code=”Applet file”
[ALT=”alternative text]
[name=AppletInstanceName]
Width=pixels
height= pixels
[align= alignment]
>
[<param name=”Attributename” value =”Attribute value”]
[<param name=”Attributename” value =”Attribute value”]
</applet>
26. Passing Parameter to Applet
• We can supply user-defined parameters to an
applet using <param.....> tag.
• Each <param....> tag has a name ,and a value
attribute.
• For e.g. the color of the text can be changed to
red by an applet using a <param...> tag as
follows
<applet ……>
<param name=“color” value=“RED”>
27. Passing Parameters to Applet
• To handle parameters, we need to do two things.
1) Include <param.....> tags in HTML document.
2) Provide code in the applet to pass these parameters.
• We can define the init() method in the applet to
get parameters defined in the <param> tags.
•
• This is done using the getParameter() method,
which takes one string argument representing
the name of the parameter and returns a string
containing the value of that parameter.
28. Example :Parameter Passing
import java.awt.*;
import java.applet.*;
public class HelloJava extends Applet
{ String str;
public void init()
{ str=getParameter(“String”);
if(str==null)
str=“Java”;
str=“Hello ” +str;
}
Public void paint(Graphics g)
{ g.drawString(“str”,10,10)
30. Displaying numerical values
import java.awt.*;
import java.applet.*;
public class Hellojava extends Applet{
public void paint(Graphics g)
{ int value1 =10;
int value2 = 20;
int sum =value1+value2;
String s= "Sum:"+String.valueOf(sum);
g.drawString(s,10,100);
}
31. Using Control Structure
import java.awt.*;
import java.applet.*;
public class Hellojava extends Applet {
public void paint(Graphics g) {
int y=50;
for(int i=1;i<=10;i++)
{ g.drawString(i+” ”,50,y);
y=y+10;
} } }
/*<applet code=“Hellojava.class” width=300 height=100>
</applet> */