Java Program to write an applet with message on Status Bar – Q48
Q48: Java Program to write an applet which displays its code base and document base and show a message on the status bar and display the received parameters which were passed to this applet.
import java.applet.*; import java.awt.*; import java.net.*; public class Ap_Paths extends Applet{ String msg; public void paint(Graphics g){ URL url_cb = getCodeBase(); msg = "CodeBase: " + url_cb.toString(); g.drawString(msg, 20, 30); URL url_db = getDocumentBase(); msg = "Doc. Base: " + url_db.toString(); g.drawString(msg, 20, 60); } }
… from College notes (BCA/MCA assignments):
Categories: Java
Java Applet Programs
Comments (0)
Trackbacks (0)
Leave a comment
Trackback