Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-24-2008, 07:09 PM
Member
 
Join Date: Jun 2008
Posts: 16
ravjot28 is on a distinguished road
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);
}
}
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-24-2008, 07:10 PM
Member
 
Join Date: Jun 2008
Posts: 16
ravjot28 is on a distinguished road
this gives the error that applet not initialize
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 06-24-2008, 09:36 PM
Senior Member
 
Join Date: Jun 2008
Posts: 469
masijade is on a distinguished road
Well, of course it can't be initialised when you've declared the Class abstract.
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 06-25-2008, 10:19 AM
Member
 
Join Date: Jun 2008
Posts: 16
ravjot28 is on a distinguished road
ohhh thanks alot
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 06-26-2008, 06:33 PM
sukatoa's Avatar
Senior Member
 
Join Date: Jan 2008
Location: Cebu City, Philippines
Posts: 527
sukatoa is on a distinguished road
Send a message via Yahoo to sukatoa
And don't forget to inclose the java code with code tags next time
__________________
A specific, detailed, simple, well elaborated, and "tested before asking" question may gather more quick replies. hopefully
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
error 530 error authentication required rgale JavaServer Pages (JSP) and JSTL 0 05-12-2008 06:28 PM


All times are GMT +3. The time now is 07:24 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org