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

Publicado em: 14 Abril 2022
no canal de: Join To Learn
1,841
30

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.
import java.awt.*;
import java.applet.*;

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

public class StatusWindow extends Applet
{
public void init()
{
setBackground(Color.cyan);
}

// Display msg in applet window.
public void paint(Graphics g)
{
g.drawString("This is in the applet window.", 10, 20);
showStatus("This is shown in the status window.");
}
}


Nesta página do site você pode assistir ao vídeo on-line Applet Status window || showStatus( ) method || Java Applets Tutorial duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Join To Learn 14 Abril 2022, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 1,841 vezes e gostou 30 espectadores. Boa visualização!