This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Applets and the fly likes why showStatus is effective only in paint method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "why showStatus is effective only in paint method" Watch "why showStatus is effective only in paint method" New topic
Author

why showStatus is effective only in paint method

abhay jain
Ranch Hand

Joined: Jun 03, 2011
Posts: 130
why showStatus() is effective only in paint method ( not in start() and init() and why than setBackground() gives effect in all methods ?? )
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41092
    
  44
Post the code that makes you believe that that is the case (please make it an SSCCE).


Ping & DNS - my free Android networking tools app
abhay jain
Ranch Hand

Joined: Jun 03, 2011
Posts: 130
import java.applet.*;
import java.awt.*;

/*

<applet
code=Helloj
width=200
height=200 >
</applet>


*/


public class Helloj extends Applet
{

public void start()
{
setBackground(Color.red);

}
public void paint (Graphics e)
{

showStatus("hi all");
e.drawString("hi all",10,10);

}

}



// on putting "showStatus("hi all");" in start() it gives no effect
 
Don't get me started about those stupid light bulbs.
 
subject: why showStatus is effective only in paint method
 
Similar Threads
Displaying status bar in JApplet
how to write info to Frame's status
Displaying status bar in JApplet
Displaying status bar in JApplet