Applet Status window || showStatus( ) method || Java Applets Tutorial

preview_player
Показать описание
Using the Status Window

• An applet can output a message to the status window of the browser or applet viewer on which it is running.

• To do so, call showStatus( ) with the string that you want displayed.

• The status window is a good place to give the user feedback about what is occurring in the applet, suggest options, or possibly report some types of errors.

• The following applet demonstrates showStatus( ):

// Using the Status Window.

/*
applet code="StatusWindow" width=300 height=50
/applet
*/

public class StatusWindow extends Applet
{
public void init()
{
}

// Display msg in applet window.
public void paint(Graphics g)
{
showStatus("This is shown in the status window.");
}
}
Рекомендации по теме