[BB chk this] Java Statusbar Banner

Questions about programming languages and debugging
Post Reply
User avatar
l0ngb1t
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 598
Joined: 15 Apr 2009, 16:00
15
Contact:

[BB chk this] Java Statusbar Banner

Post by l0ngb1t »

been working with java applet and threads lately
so this is the combination of both, i've seen this thing on a bank site so i thought i can try and do it,
it simply change the status bar context continuously and it appear as a banner in the status bar of the browser (don't work with chrome)
so maybe we can add this to the site make it look even cooler 8)

Code: Select all

import java.awt.*;
import java.applet.*;
public class StatusBanner extends Applet implements Runnable{
String msg = "suck-o Mind Over Matter    ";
Thread t;
boolean stop;

public void init(){
t=null;}

public void start(){
	t=new Thread(this);
	stop = false;
        t.start();
    
}

public void run(){
    char ch;
    try{
    while(true){
        getAppletContext().showStatus(msg);
        Thread.sleep(150);
        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;
}
}

    /*---__-_-__-____---_-__---__---_----_--_____--_____----__*/
    /*******>             Coded by l0ngb1t             <*******/
    /**>                From www.suck-o.com                 <**/
    /*******>             Mind Over Matter            <********/
    /*--__-_-___-_-___---___--_-___--____---__-__---___-----__*/


for all those who want to test it compile or download the .class file from here http://www.sendspace.com/file/ahx90l

create an html file the same directory as the .class file and c/p this into it

Code: Select all

<HTML>
<BODY>
<applet code="StatusBanner">
</applet>
</BODY>
</HTML>
make sure you have java installed on your pc.
and open the page
thinking about selling it for some local sites here and make some money :P how much you guys think i can get for each site :P
There is an UNEQUAL amount of good and bad in most things, the trick is to work out the ratio and act accordingly. "The Jester"

User avatar
Lundis
Distorter of Reality
Distorter of Reality
Posts: 543
Joined: 22 Aug 2008, 16:00
15
Location: Deadlock of Awesome
Contact:

Re: [BB chk this] Java Statusbar Banner

Post by Lundis »

I can't even test it... Java applets don't work on my ubuntu xD

I do say that I hate anything that changes the status bar with a passion though... It's there to let you see where links will take you, if you remove that you wouldn't have a clue whether you're being linked to youtube or a shitty porn site.

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

Re: [BB chk this] Java Statusbar Banner

Post by bad_brain »

thanks l0ngb1t, I tested it and it works, good work man! :D
but it might not be the best idea to add it to suck-o, first of all because there is a lot of Java and JS stuff already running like for the galleries and especially for admin ifaces, and you never know what kind of interferences appear....I had lots of trouble with applets/scripts that caused weird effects on each other already before. but it might be something for the suck-o status page (cats, if you are reading this, can you set it up on your server? my server config makes it damn hard to run on mine). :-k
Image

User avatar
l0ngb1t
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 598
Joined: 15 Apr 2009, 16:00
15
Contact:

Re: [BB chk this] Java Statusbar Banner

Post by l0ngb1t »

both guys have good points.
however, thought i post it and show off a bit :lol:
i think i'll show to some local site admins maybe they buy it for 5$ :P most of them use just dreamweaver, rare are those who code.
There is an UNEQUAL amount of good and bad in most things, the trick is to work out the ratio and act accordingly. "The Jester"

User avatar
l0ngb1t
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 598
Joined: 15 Apr 2009, 16:00
15
Contact:

Re: [BB chk this] Java Statusbar Banner

Post by l0ngb1t »

p4inl0v3r wrote:dont ask for money, ask the admins to make you site moderator instead ;)
mmm good idea, but am not that good at web dev thou, just adding and editing stuff.
There is an UNEQUAL amount of good and bad in most things, the trick is to work out the ratio and act accordingly. "The Jester"

Post Reply