Results 1 to 5 of 5
Thread: Help Error
- 06-24-2008, 05:09 PM #1
Member
- Join Date
- Jun 2008
- Posts
- 87
- Rep Power
- 0
Help Error
import java.applet.*;
import java.awt.*;
public abstract class banner extends Applet implements Runnable {
String msg="My New Banner";
Thread t=null;
int state;
boolean stop;
public void init(){
setBackground(Color.RED);
setForeground(Color.black);
}
public void start(){
t=new Thread(this);
t.start();
stop=false;
}
public void run(){
char ch;
for(;;){
try{
repaint();
Thread.sleep(1000);
ch=msg.charAt(0);
msg=msg.substring(1,msg.length());
msg+=ch;
if(stop){
break;
}
}catch(InterruptedException e){
}
}
}
public void stop(){stop=true;
t=null;
}
public void paint(Graphics g){
g.drawString(msg, 20, 56);
}
}
- 06-24-2008, 05:10 PM #2
Member
- Join Date
- Jun 2008
- Posts
- 87
- Rep Power
- 0
this gives the error that applet not initialize
- 06-24-2008, 07:36 PM #3
Senior Member
- Join Date
- Jun 2008
- Posts
- 2,366
- Rep Power
- 7
Well, of course it can't be initialised when you've declared the Class abstract.
- 06-25-2008, 08:19 AM #4
Member
- Join Date
- Jun 2008
- Posts
- 87
- Rep Power
- 0
ohhh thanks alot
- 06-26-2008, 04:33 PM #5
Similar Threads
-
error 530 error authentication required
By rgale in forum JavaServer Pages (JSP) and JSTLReplies: 0Last Post: 05-12-2008, 04:28 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks