How to display message in browser status bar in Java?

Below java code shows how to display message in browser status bar using applet in java –

/****************************************************************************************
 * Created on 07-2011 Copyright(c) http://kodehelp.com All Rights Reserved.
 ****************************************************************************************/
package com.kodehelp.java.applet;

import java.applet.Applet;
import java.awt.*;

/**
 * Created by Vigilance India.
 * User: http://kodehelp.com
 * Date: Jul 31, 2011
 */
public class DisplayMessageApplet extends Applet {
    private String message="";
    public void init(){
       message = getParameter("message");
    }

    public void paint(Graphics g) {
        showStatus(message);
    }
}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <title>Parameterized Applet</title>
</head>
<body>
    <applet code="com.kodehelp.java.applet.DisplayMessageApplet"
            height="150" width="350">
        <param name="message" value="This is message displayed on Status bar" />
    </applet>
</body>
</html>

Please Post Your Comments & Reviews

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.