A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
JavaRanch
»
Java Forums
»
Java
»
Applets
Author
why showStatus is effective only in paint method
abhay jain
Ranch Hand
Joined: Jun 03, 2011
Posts: 130
posted
Jun 14, 2011 23:12:16
0
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: 35258
7
posted
Jun 14, 2011 23:17:51
0
Post the code that makes you believe that that is the case (please make it an
SSCCE
).
Android apps
–
ImageJ plugins
–
Java web charts
abhay jain
Ranch Hand
Joined: Jun 03, 2011
Posts: 130
posted
Jun 14, 2011 23:22:46
0
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
I agree. Here's the link:
http://ej-technologies/jprofiler
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: why showStatus is effective only in paint method
Similar Threads
Displaying status bar in JApplet
showStatus( "String" ) - where does it work?
Displaying status bar in JApplet
how to write info to Frame's status
Displaying status bar in JApplet
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter