Official Soldat Forums

Soldat Fans => Fan Apps => Topic started by: iDante on August 03, 2008, 06:51:55 am

Title: Soldat Admin Java Applet
Post by: iDante on August 03, 2008, 06:51:55 am
Soldat Admin Applet
by iDante (with very minor help from the dude that wrote SARJ)

This is a veery simple admin program, the only reason it could be of any use to anyone is that it can be embedded in websites with the following steps:

1. Add Admin.jar to your website.
2. Add this code to where you want it to appear (don't change width, be careful with height):
Code: [Select]
<APPLET code="SoldatAdmin.class" archive="Admin.jar" width="800" height="400">

I really just made this to learn how to do some things in java (threads, sockets, more advanced GUI's), so I don't really plan on adding much more to it.
Title: Re: Soldat Admin Java Applet
Post by: ManSoft|Warlord on August 03, 2008, 06:56:39 am
n1! I did something like that in PHP: http://soldatadmin.soldatnet.de/ :D

€dit: Maybe you should mask the password with "*" ;)
Title: Re: Soldat Admin Java Applet
Post by: iDante on August 03, 2008, 07:03:40 am
€dit: Maybe you should mask the password with "*" ;)
I could... but java doesn't have an automatic thing to do that like HTML :P

Right now it only refreshes when you hit the Refresh button or type REFRESH into the command thing... should I make it so that whenever a message is sent to the client it should refresh (only one line of code)?
Title: Re: Soldat Admin Java Applet
Post by: ManSoft|Warlord on August 03, 2008, 07:42:35 am
for the refresh-thing: Try to do it as a thread :D with a delay(5000)-procedure:

Code: [Select]
import java.lang.Thread;

public class ThreadSleepDemonstration {
public static void main(String[] args) {
System.out.print("Hello");
try {
Thread.sleep(2000);
} catch (InterruptedException e) {} // nichts
System.out.print(" World!");
}
}
Title: Re: Soldat Admin Java Applet
Post by: iDante on August 05, 2008, 04:32:19 am
Critical error fixed
Turns out that java applets can't set up sockets to other servers than the ones they're on. I didn't notice this when making it because I used a local dedicated server to test it.
The only way to get around this is to "sign" the applet, AKA put it in a .jar and make whoever is using it say "OK" that it will set up a connection to another server before the applet even loads.

Also, the code to include it in html is updated.
Title: Re: Soldat Admin Java Applet
Post by: kefoo on August 22, 2008, 06:55:07 am
Wooooohooo, nice program. Did you really do it ?
Title: Re: Soldat Admin Java Applet
Post by: miketh2005 on September 20, 2008, 07:22:39 pm
You know what would be way cool? Make something like this, but for regular players, that way you can put it on your site like a lil shout box thingy, and talk to the players playing in the server :D It would be super super super super fun. You should make it so that the color is the server is Blue, and it says the username that they imput in the java applet.
Title: Re: Soldat Admin Java Applet
Post by: omerstart on March 19, 2011, 03:39:47 am
great program :)
look at my site;
http://soldat.turkforumpro.com/t25-soldat-admin-program-online#25
thx iDante but I think the bigger thing .  Soldat mobile phone program .  I work will begin .
Screen size 320 * 240  and will be supported java .  Thanks again