Answer Posted / krishgopal
import java.applet.*;
import java.awt.*;
/*
<applet code="app" width=400 height=500>
</applet>
*/
public class app extends Applet {
public void paint(Graphics g)
{
g.drawString("hi java",100,200);
}
}
here we use applet pack to retrive all its mathods
to create an applet.
and awt to create window events.
all that u known.
paint() is to paint the page that means
create a page and putting everything on it.
"hi java" is a string to dispaly on sgrren and
100,200 are x &y axis' to the text where to
dispaly on screen.
applet code is must to disply an applet prgrm.
width=400 height=500 r size of dispalying screen.
we can dispaly applet prgrm in any browser
with use of HTML prgrm.
for more details just refer "complete reference" book.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Can you sort a string in java?
What are the characteristics of Final,Finally and Finalize keywords.
Can a constructor call the constructor of parent class?
Does list allow duplicates in java?
Is java 1.7 the same as java 7?
What is java util list?
What does nullpointerexception mean?
What is this keyword used for?
What is the use of hashmap in java?
How does hashset works in java?
Is it necessary for the port addresses to be unique? Explain with reason.
What is difference between class and object in java?
Name the components that are termed to be Heavy-weight component but available in Light-weight components?
Difference between a class and an object?
Can we declare an array without size in java?