deleted

Status
Not open for further replies.
This is my HelloWorld.java file code

import java.applet.Applet;
import java.awt.Graphics;

public class HelloWorld extends Applet {
public void paint(Graphics g) {
g.drawString("Hello world!", 50, 25);
}
}
This is my Hello.html file code

<html>
<body>
Here is the output of my program:
<applet code="HelloWorld.class" width="150" height="25"></applet>
</body>
</html>
Both the files are saved to desktop.

This is what I did:

  1. Open CMD
  2. Type cd desktop
  3. Type javac HelloWorld.java
Note: If no.3 is not working. you need to path java jdk first in local disk (C). Find the java folder then choose any jdk. then copy paste the "C:\Program Files\Java\jdk1.8.0_221" to cmd

4. Type appletviewer Hello.html

eto paps pag sa cmd.
 
Status
Not open for further replies.

About this Thread

  • 23
    Replies
  • 694
    Views
  • 3
    Participants
Last reply from:
msstar

Trending Topics

Online now

Members online
1,154
Guests online
3,679
Total visitors
4,833

Forum statistics

Threads
2,306,773
Posts
29,174,219
Members
1,194,035
Latest member
srinu
Back
Top