<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>Java Programming Forum - Learn Java Programming - Java Applets</title>
		<link>http://www.java-forums.org/</link>
		<description>Discussions on using, developing, and deploying Java applets.</description>
		<language>en</language>
		<lastBuildDate>Tue, 18 Jun 2013 04:59:42 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://www.java-forums.org/images/misc/rss.png</url>
			<title>Java Programming Forum - Learn Java Programming - Java Applets</title>
			<link>http://www.java-forums.org/</link>
		</image>
		<item>
			<title>Applets not running in jre7</title>
			<link>http://www.java-forums.org/java-applets/78021-applets-not-running-jre7.html</link>
			<pubDate>Sun, 16 Jun 2013 17:39:52 GMT</pubDate>
			<description>Hi there, 
 
I have simple java3d applet which was running fine with java 6. When I installed java 7 in my machine (after uninstalling java 6), my...</description>
			<content:encoded><![CDATA[<div>Hi there,<br />
<br />
I have simple java3d applet which was running fine with java 6. When I installed java 7 in my machine (after uninstalling java 6), my applet stopped working. <br />
<br />
Few observations:<br />
1) Woking fine in eclipse applet viewer even with jre7<br />
2) Uninstalled JDK 6 too..I just tried to access my applet with everything related to java uninstalled; Then I tried to access applet through Chrome browser, Broweser prompted to install jre7 plugin, which I did.<br />
3) Signed my jars using jarsigner<br />
4) I am getting similar errors in other browsers too<br />
5) Using Windows Vista OS<br />
<br />
<br />
Here is the stacktrace<br />
<br />
NativeLibLoader: resolving loaded C:\Program Files\Java\jre7\bin\plugin2\npjp2.d<br />
ll<br />
   (Succeeded)<br />
NativeLibLoader: C:\PROGRA~1\Java\jre7\lib\bin\jp2native.dll doesn't exist<br />
NativeLibLoader: trying to load C:\PROGRA~1\Java\jre7\bin\jp2native.dll<br />
  (Succeeded)<br />
MozillaPlugin.MozillaPlugin with browser thread ID: 5660<br />
MozillaPlugin.setWindow sun.plugin2.main.server.MozillaPlugin@c00025 hWndControl<br />
Window = 132340 caRenderServerName = null<br />
  Attempting to start applet<br />
1 JavaFX runtime found.<br />
  1) JavaFX 2.2.21 found at C:\PROGRA~1\Java\jre7\<br />
JVMLauncher.start: launcher params:<br />
        &lt;-Xbootclasspath/a:C:\PROGRA~1\Java\jre7\lib\deploy.jar;C:\PROGRA~1  \Java<br />
\jre7\lib\javaws.jar;C:\PROGRA~1\Java\jre7\lib\plu  gin.jar&gt;<br />
        &lt;-Djava.class.path=C:\PROGRA~1\Java\jre7\classes&gt;<br />
        &lt;-Djava.ext.dirs=C:\PROGRA~1\Java\jre7\lib\ext;C:\Wi  ndows\Sun\Java\Deplo<br />
yment\lib\trusted&gt;<br />
        &lt;-Dsun.awt.warmup=true&gt;<br />
        &lt;---&gt;<br />
        &lt;--&gt;<br />
        &lt;sun.plugin2.main.client.PluginMain&gt;<br />
        &lt;write_pipe_name=jpi2_pid4276_pipe2,read_pipe_name  =jpi2_pid4276_pipe1&gt;<br />
JVMLauncher.start(): now - user.startApplet(): 26203 us<br />
JVMLauncher.processArg[0]: C:\Program Files\Java\jre7\bin\jp2launcher.exe<br />
JVMLauncher.processArg[1]: -D__jvm_launched=2242808071<br />
JVMLauncher.processArg[2]: -D__applet_launched=2242781868<br />
JVMLauncher.processArg[3]: -Djava.ext.dirs=C:\PROGRA~1\Java\jre7\lib\ext;C:\Wi  nd<br />
ows\Sun\Java\Deployment\lib\trusted<br />
JVMLauncher.processArg[4]: -Dsun.awt.warmup=true<br />
JVMLauncher.processArg[5]: sun.plugin2.main.client.PluginMain<br />
JVMLauncher.processArg[6]: write_pipe_name=jpi2_pid4276_pipe2,read_pipe_name=  jpi<br />
2_pid4276_pipe1<br />
JVMLauncher.processArgs total len: 321, custArgsMaxLen: 8058<br />
JVMLauncher.afterStart(): starting JVM process watcher<br />
JVMInstance.start: JVMID original params array:<br />
        [0][0]: &lt;-Xbootclasspath/a:C:\PROGRA~1\Java\jre7\lib\deploy.jar;C:\PROGR<br />
A~1\Java\jre7\lib\javaws.jar;C:\PROGRA~1\Java\jre7  \lib\plugin.jar&gt;<br />
        [0][1]: &lt;-Djava.class.path=C:\PROGRA~1\Java\jre7\classes&gt;<br />
        [0][2]: &lt;-Djava.ext.dirs=C:\PROGRA~1\Java\jre7\lib\ext;C:\Wi  ndows\Sun\Ja<br />
va\Deployment\lib\trusted&gt;<br />
        [0][3]: &lt;-Dsun.awt.warmup=true&gt;<br />
        [4][0]: &lt;null&gt;<br />
JRE 1.7.0.21: Rejecting attempt to specify unsupported characters in command-lin<br />
e argument: -Djava.ext.dirs=C:\PROGRA~1\Java\jre7\lib\ext;C:\Wi  ndows\Sun\Java\De<br />
ployment\lib\trusted<br />
java.io.IOException: Never received connection from client side<br />
        at sun.plugin2.ipc.windows.WindowsNamedPipe.waitForCo  nnection(Unknown So<br />
urce)<br />
        at sun.plugin2.ipc.windows.WindowsNamedPipe.write(Unk  nown Source)<br />
        at sun.plugin2.message.transport.NamedPipeTransport$S  erializerImpl.flush<br />
(Unknown Source)<br />
        at sun.plugin2.message.transport.NamedPipeTransport.s  ignalDataWritten(Un<br />
known Source)<br />
        at sun.plugin2.message.transport.SerializingTransport  .write(Unknown Sour<br />
ce)<br />
        at sun.plugin2.message.Pipe.send(Unknown Source)<br />
        at sun.plugin2.main.server.JVMInstance.sendMessageDir  ect(Unknown Source)<br />
<br />
        at sun.plugin2.main.server.JVMInstance.sendMessage(Un  known Source)<br />
        at sun.plugin2.main.server.JVMInstance.startImpl(Unkn  own Source)<br />
        at sun.plugin2.main.server.JVMInstance.start(Unknown Source)<br />
        at sun.plugin2.main.server.JVMManager.getOrCreateBest  JVMInstance(Unknown<br />
 Source)<br />
        at sun.plugin2.main.server.JVMManager.startAppletImpl  (Unknown Source)<br />
        at sun.plugin2.main.server.JVMManager.startApplet(Unk  nown Source)<br />
        at sun.plugin2.main.server.JVMManager.startApplet(Unk  nown Source)<br />
        at sun.plugin2.main.server.MozillaPlugin.maybeStartAp  plet(Unknown Source<br />
)<br />
        at sun.plugin2.main.server.MozillaPlugin.setWindow(Un  known Source)<br />
java.io.IOException: Error closing WindowsNamedPipe: server: true; readPipe: jpi<br />
2_pid4276_pipe2, readBufferSz: 4096; writePipe: jpi2_pid4276_pipe1, writeBufferS<br />
z: 4096<br />
        at sun.plugin2.ipc.windows.WindowsNamedPipe.close(Unk  nown Source)<br />
        at sun.plugin2.message.transport.NamedPipeTransport.s  hutdown(Unknown Sou<br />
rce)<br />
        at sun.plugin2.message.transport.NamedPipeTransportFa  ctory.dispose(Unkno<br />
wn Source)<br />
        at sun.plugin2.main.server.JVMInstance.disposePipe(Un  known Source)<br />
        at sun.plugin2.main.server.JVMInstance.restart(Unknow  n Source)<br />
        at sun.plugin2.main.server.JVMInstance.access$2800(Un  known Source)<br />
        at sun.plugin2.main.server.JVMInstance$Listener.jvmEx  ited(Unknown Source<br />
)<br />
        at sun.plugin2.jvm.JVMLauncher.fireJVMExited(Unknown Source)<br />
        at sun.plugin2.jvm.JVMLauncher.access$300(Unknown Source)<br />
        at sun.plugin2.jvm.JVMLauncher$JVMWatcher.run(Unknown Source)<br />
        at java.lang.Thread.run(Unknown Source)<br />
java.lang.InterruptedException<br />
        at java.lang.Object.wait(Native Method)JVMLauncher.start: launcher param<br />
s:<br />
<br />
        &lt;-Xbootclasspath/a:C:\PROGRA~1\Java\jre7\lib\deploy.jar;C:\PROGRA~1  \Java<br />
\jre7\lib\javaws.jar;C:\PROGRA~1\Java\jre7\lib\plu  gin.jar&gt;<br />
        at sun.plugin2.message.Queue.waitForMessage(Unknown Source)     &lt;-Djava.<br />
class.path=C:\PROGRA~1\Java\jre7\classes&gt;<br />
<br />
        &lt;-Djava.ext.dirs=C:\PROGRA~1\Java\jre7\lib\ext;C:\Wi  ndows\Sun\Java\Deplo<br />
yment\lib\trusted&gt;<br />
        &lt;-Dsun.awt.warmup=true&gt;<br />
        at sun.plugin2.message.Pipe$1.run(Unknown Source)       &lt;---&gt;<br />
        &lt;--&gt;<br />
        &lt;sun.plugin2.main.client.PluginMain&gt;<br />
<br />
        &lt;write_pipe_name=jpi2_pid4276_pipe4,read_pipe_name  =jpi2_pid4276_pipe3&gt;<br />
        at com.sun.deploy.util.Waiter$1.wait(Unknown Source)JVMLauncher.start():<br />
 now - user.startApplet(): 1671839 us<br />
JVMLauncher.processArg[0]: C:\Program Files\Java\jre7\bin\jp2launcher.exe<br />
<br />
JVMLauncher.processArg[1]: -D__jvm_launched=2244453707<br />
        at com.sun.deploy.util.Waiter.runAndWait(Unknown Source)<br />
JVMLauncher.processArg[2]: -D__applet_launched=2242781868<br />
        at sun.plugin2.message.Pipe.receive(Unknown Source)<br />
JVMLauncher.processArg[3]: -Djava.ext.dirs=C:\PROGRA~1\Java\jre7\lib\ext;C:\Wi  nd<br />
ows\Sun\Java\Deployment\lib\trusted<br />
        at sun.plugin2.main.server.JVMInstance$WorkerThread.r  un(Unknown Source)J<br />
VMLauncher.processArg[4]: -Dsun.awt.warmup=true<br />
<br />
JVMLauncher.processArg[5]: sun.plugin2.main.client.PluginMain<br />
java.lang.InterruptedExceptionJVMLauncher.processA  rg[6]: write_pipe_name=jpi2_pi<br />
d4276_pipe4,read_pipe_name=jpi2_pid4276_pipe3<br />
<br />
        at java.lang.Object.wait(Native Method)JVMLauncher.processArgs total len<br />
: 321, custArgsMaxLen: 8058<br />
<br />
        at sun.plugin2.message.Queue.waitForMessage(Unknown Source)<br />
        at sun.plugin2.message.Pipe$1.run(Unknown Source)<br />
        at com.sun.deploy.util.Waiter$1.wait(Unknown Source)<br />
JVMLauncher.afterStart(): starting JVM process watcher<br />
        at com.sun.deploy.util.Waiter.runAndWait(Unknown Source)<br />
JVMInstance.start: JVMID original params array:<br />
        at sun.plugin2.message.Pipe.receive(Unknown Source)<br />
        [0][0]: &lt;-Xbootclasspath/a:C:\PROGRA~1\Java\jre7\lib\deploy.jar;C:\PROGR<br />
A~1\Java\jre7\lib\javaws.jar;C:\PROGRA~1\Java\jre7  \lib\plugin.jar&gt;<br />
        at sun.plugin2.main.server.JVMInstance$WorkerThread.r  un(Unknown Source)<br />
        [0][1]: &lt;-Djava.class.path=C:\PROGRA~1\Java\jre7\classes&gt;<br />
        [0][2]: &lt;-Djava.ext.dirs=C:\PROGRA~1\Java\jre7\lib\ext;C:\Wi  ndows\Sun\Ja<br />
va\Deployment\lib\trusted&gt;<br />
        [0][3]: &lt;-Dsun.awt.warmup=true&gt;<br />
        [4][0]: &lt;null&gt;<br />
JRE 1.7.0.21: Rejecting attempt to specify unsupported characters in command-lin<br />
e argument: -Djava.ext.dirs=C:\PROGRA~1\Java\jre7\lib\ext;C:\Wi  ndows\Sun\Java\De<br />
ployment\lib\trusted<br />
<br />
Please advise on what could be an issue; Any suggestions are greatly appreciated as we are trying to nail down from past few days without much luck.<br />
<br />
Regards,<br />
Mano</div>

]]></content:encoded>
			<category domain="http://www.java-forums.org/java-applets/">Java Applets</category>
			<dc:creator>manchet</dc:creator>
			<guid isPermaLink="true">http://www.java-forums.org/java-applets/78021-applets-not-running-jre7.html</guid>
		</item>
		<item>
			<title>A couple of questions</title>
			<link>http://www.java-forums.org/java-applets/77555-couple-questions.html</link>
			<pubDate>Fri, 14 Jun 2013 09:05:32 GMT</pubDate>
			<description>Hi all, 
 
I know many of you are very advanced here, so please excuse my lack of knowledge regarding applets. Would anyone be able to tell me how to...</description>
			<content:encoded><![CDATA[<div>Hi all,<br />
<br />
I know many of you are very advanced here, so please excuse my lack of knowledge regarding applets. Would anyone be able to tell me how to add the &quot;lake,&quot; effect to a photo or painting, like the ones you load up to Glitter Graphics?  I use to be able to use Anfy Team applets, but they stopped supporting the Mac platform.  I would like to ask also if anyone knows of any sites that generate the applets effects for you and all you have to do is to load up your image/photo to their site and the effects are added on. Then they give you a code you can copy? I use to have the link for a place that did this, but I lost it. I'm trying to add the lake effect to an image I created, to put up on a message board as my signature. Thank you for any insight.<br />
<br />
-Elita<br />
<br />
P.S. I'm sorry if I've confused you. I don't know how else to explain it. :s:</div>

]]></content:encoded>
			<category domain="http://www.java-forums.org/java-applets/">Java Applets</category>
			<dc:creator>perfidia</dc:creator>
			<guid isPermaLink="true">http://www.java-forums.org/java-applets/77555-couple-questions.html</guid>
		</item>
		<item>
			<title>magical error ClassFormatError with Applet</title>
			<link>http://www.java-forums.org/java-applets/76434-magical-error-classformaterror-applet.html</link>
			<pubDate>Sat, 08 Jun 2013 10:01:26 GMT</pubDate>
			<description>Hey I created a Java web project, 
 
It has a servlet and the servlet calls a jsp page. 
On this jsp page I call an applet, but when I run it in my...</description>
			<content:encoded><![CDATA[<div>Hey I created a Java web project,<br />
<br />
It has a servlet and the servlet calls a jsp page.<br />
On this jsp page I call an applet, but when I run it in my browser the applet gives a magical error some number (ClassFormatError).<br />
<br />
No I am only learning, so I created a new project with an empty applet thats runnable.<br />
I copied the class file from that project and put in a directory where I could access it from my jsp page. (I also shanged the package to the correct one).<br />
<br />
What am i doing wrong, I only wan't to see an empty applet in my browser for learning purposes.<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">import java.applet.Applet;<br />
<br />
/*<br />
&nbsp;* To change this template, choose Tools | Templates<br />
&nbsp;* and open the template in the editor.<br />
&nbsp;*/<br />
public class AppletTest extends Applet{<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; public void init(){<br />
&nbsp; &nbsp; &nbsp; &nbsp; System.out.println(&quot;test&quot;);<br />
&nbsp; &nbsp; }<br />
}</code><hr />
</div><div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code"> &lt;jsp:plugin type=&quot;applet&quot; code=&quot;JavaApplet.class&quot; codebase=&quot;./Applets&quot;<br />
&nbsp; width=&quot;800&quot; height=&quot;600&quot;&gt;<br />
&nbsp; &lt;jsp:fallback&gt;<br />
&nbsp;  &lt;p&gt;Unable to load applet&lt;/p&gt;<br />
&nbsp;  &lt;/jsp:fallback&gt;<br />
&lt;/jsp:plugin&gt;</code><hr />
</div></div>

]]></content:encoded>
			<category domain="http://www.java-forums.org/java-applets/">Java Applets</category>
			<dc:creator>The original stinger</dc:creator>
			<guid isPermaLink="true">http://www.java-forums.org/java-applets/76434-magical-error-classformaterror-applet.html</guid>
		</item>
		<item>
			<title><![CDATA[java.lang.IllegalArgumentException: URI scheme is not "file"]]></title>
			<link>http://www.java-forums.org/java-applets/75695-java-lang-illegalargumentexception-uri-scheme-not-file.html</link>
			<pubDate>Thu, 06 Jun 2013 21:21:20 GMT</pubDate>
			<description><![CDATA[Uploading my applet and getting this error: 
 
java.lang.IllegalArgumentException: URI scheme is not "file" 
	at java.io.File.<init>(File.java:366)...]]></description>
			<content:encoded><![CDATA[<div>Uploading my applet and getting this error:<br />
<br />
java.lang.IllegalArgumentException: URI scheme is not &quot;file&quot;<br />
	at java.io.File.&lt;init&gt;(File.java:366)<br />
	at slideshowapplet.SlideshowApplet.checkImageFolders(  SlideshowApplet.java:424)<br />
	at slideshowapplet.SlideshowApplet.init(SlideshowAppl  et.java:173)<br />
	at sun.plugin2.applet.Plugin2Manager$AppletExecutionR  unnable.run(Plugin2Manager.java:1658)<br />
	at java.lang.Thread.run(Thread.java:680)<br />
<br />
Until now it worked on the browser from a file on my computer....<br />
<br />
<br />
<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">/*<br />
&nbsp;* To change this template, choose Tools | Templates<br />
&nbsp;* and open the template in the editor.<br />
&nbsp;*/<br />
<br />
package slideshowapplet;<br />
<br />
/**<br />
&nbsp;*<br />
&nbsp;* @author willem<br />
&nbsp;*/<br />
<br />
<br />
import java.io.*;<br />
//import java.io.IOException;<br />
import javax.activation.MimetypesFileTypeMap;<br />
import javax.imageio.ImageIO;<br />
import javax.swing.border.Border;<br />
<br />
import java.awt.*;<br />
import java.util.*;<br />
import java.awt.event.*;<br />
import java.net.URISyntaxException;<br />
import java.net.URL;<br />
import javax.swing.*;<br />
import javax.swing.Timer;<br />
<br />
<br />
public class SlideshowApplet extends JApplet implements Runnable {<br />
&nbsp; &nbsp; //String name;<br />
&nbsp; &nbsp; private Thread runner;<br />
&nbsp; &nbsp; private MimetypesFileTypeMap ft;<br />
&nbsp; &nbsp; private JPanel imagePanelx;<br />
&nbsp; &nbsp; private int screenx = 700, screeny = 600, xwindowsize = 1000,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ywindowsize = 800, imageWidth, imageHeight, slidetime,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; maximages, imagecount, leftcornerX, leftcornerY;<br />
&nbsp; &nbsp; private boolean timerflag=true, textflag = false;<br />
&nbsp; &nbsp; private URL imagePath, iconPath;<br />
&nbsp; &nbsp; private File folder;<br />
&nbsp; &nbsp; private String&nbsp; foldername;<br />
&nbsp; &nbsp; private ActionListener blistener;<br />
&nbsp; &nbsp; private ActionListener timelistener;<br />
&nbsp; &nbsp; private ArrayList imagefiles;<br />
&nbsp; &nbsp; private JButton ST, BW, FW;<br />
&nbsp; &nbsp; private ImageIcon BWicon, FWicon, STicon, GOicon;<br />
&nbsp; &nbsp; private DisplayScreen DS;<br />
&nbsp; &nbsp; private Color bluecolor, blackcolor, redcolor, colorset;<br />
&nbsp; &nbsp; private Timer time;<br />
&nbsp; &nbsp; private JLabel label1, label2, label3, label4, label5, textlabel;<br />
<br />
<br />
<br />
&nbsp; &nbsp; public void init() {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; // the five parameters set the functions of the<br />
&nbsp; &nbsp; &nbsp; &nbsp; // slideshow: foldername that contains the pictures<br />
&nbsp; &nbsp; &nbsp; &nbsp; // within workdir images/slideshow/foldername to set<br />
&nbsp; &nbsp; &nbsp; &nbsp; // next the duration in seconds<br />
&nbsp; &nbsp; &nbsp; &nbsp; // the screen size of the slides in x/y<br />
&nbsp; &nbsp; &nbsp; &nbsp; // and finally the flag for the buttons if thrue<br />
&nbsp; &nbsp; &nbsp; &nbsp; // there are buttons to stop and forward/ backward images<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; // the applet tag parameters<br />
&nbsp; &nbsp; &nbsp; &nbsp; int buttons = 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; foldername = getParameter(&quot;foldername&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (foldername == null) foldername = &quot;calella&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; System.out.println(&quot;image foldername &quot; + foldername);<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; try{<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int dt = Integer.parseInt(getParameter(&quot;displaytext&quot;));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (dt == 1) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; textflag = true;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; textflag = false;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; catch(NumberFormatException e){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; slidetime = 5;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; timerflag = true;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(&quot;image time wrong &quot; + slidetime);<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; try{<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int intValue = Integer.parseInt(getParameter(&quot;setbackgroundcolor&quot;), 16);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; colorset = new Color( intValue );<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; catch(NumberFormatException e){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int intValue = Integer.parseInt(getParameter(&quot;FFFFFF&quot;), 16);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; colorset = new Color( intValue );<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(&quot;no background available&quot; + slidetime);<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; try{<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; slidetime = Integer.parseInt(getParameter(&quot;imagetime&quot;));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (slidetime == 0) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; timerflag = false;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; buttons = 2;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; timerflag = true;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; buttons = 3;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; catch(NumberFormatException e){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; slidetime = 5;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; timerflag = true;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(&quot;image time wrong &quot; + slidetime);<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; try{<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; screenx = Integer.parseInt(getParameter(&quot;sizeX&quot;));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (screenx == 0) screenx = 400;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; catch(NumberFormatException e){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; screenx = 400;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(&quot;screenX wrong &quot; + screenx);<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; try{<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; screeny = Integer.parseInt(getParameter(&quot;sizeY&quot;));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (screeny == 0) screeny = 400;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; catch(NumberFormatException e){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; screeny = 430;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(&quot;screenY wrong &quot; + screeny);<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; try{<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; buttons = Integer.parseInt(getParameter(&quot;buttons&quot;));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (buttons == 0) timerflag = true;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (buttons == 2) timerflag = false;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else timerflag = true;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(&quot;button &quot; + buttons + &quot; timerflag &quot; + timerflag);<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; catch(NumberFormatException e){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; buttons = 3;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; timerflag = true;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(&quot;buttonflag wrong &quot; + buttons);<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; try{<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int crossover = Integer.parseInt(getParameter(&quot;crossover&quot;));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (crossover == 0) crossover = -1;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; catch(NumberFormatException e){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(&quot;cross over wrong &quot; );<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; leftcornerX = 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; leftcornerY = 0;<br />
<br />
&nbsp; &nbsp; //&nbsp; &nbsp; setBounds(leftcornerX, leftcornerY, xwindowsize, ywindowsize);<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; bluecolor = Color.BLUE;<br />
&nbsp; &nbsp; &nbsp; &nbsp; blackcolor = Color.BLACK;<br />
&nbsp; &nbsp; &nbsp; &nbsp; redcolor = Color.RED;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; // this method checks the presences of the two image folders<br />
&nbsp; &nbsp; &nbsp; &nbsp; // 1) &quot;images&quot; and &quot;slideshow&quot; folder<br />
&nbsp; &nbsp; &nbsp; &nbsp; // 2) the current folder, within the second folder,<br />
&nbsp; &nbsp; &nbsp; &nbsp; // sets by the applet tag. The doListofImages sets<br />
&nbsp; &nbsp; &nbsp; &nbsp; // an array with the valit image file names<br />
&nbsp; &nbsp; &nbsp; &nbsp; // the GUI stuff<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; // add panel to frame<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; blistener = new ButtonDialog();<br />
&nbsp; &nbsp; &nbsp; &nbsp; timelistener = new TimeSetter();<br />
&nbsp; &nbsp; &nbsp; &nbsp; ft = new MimetypesFileTypeMap(); // image type check<br />
&nbsp; &nbsp; &nbsp; &nbsp; doListofImagefiles(checkImageFolders(foldername));<br />
&nbsp; &nbsp; &nbsp; &nbsp; DS = new DisplayScreen();&nbsp; // the display panel<br />
&nbsp; &nbsp; &nbsp; &nbsp; this.add(createGUI(buttons)); // two/ three or none buttons 2/3 or 0<br />
&nbsp; &nbsp; &nbsp; &nbsp; DS.getSlideImage(imagefiles.get(0));<br />
&nbsp; &nbsp; &nbsp; &nbsp; repaint();<br />
&nbsp; &nbsp; }<br />
<br />
<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; // the GUI and the button panel<br />
&nbsp; &nbsp; private JPanel createGUI(int bt) {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; JPanel mainPanel = new JPanel(new BorderLayout());<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; JPanel buttonPanel = new JPanel();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; JPanel southPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; JPanel northPanel = new JPanel(new GridLayout(5,1));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mainPanel.setBackground(colorset);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; buttonPanel.setBackground(colorset);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; southPanel.setBackground(colorset);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; northPanel.setBackground(colorset);<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; textlabel = new JLabel();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; label1 = new JLabel();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; label2 = new JLabel();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; label3 = new JLabel();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; label4 = new JLabel();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; label5 = new JLabel();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; northPanel.add(label1);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; northPanel.add(label2);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; northPanel.add(label3);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; northPanel.add(label4);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; northPanel.add(label5);<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (bt != 0)&nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FW = new JButton();<br />
&nbsp; &nbsp; &nbsp; //&nbsp; &nbsp; &nbsp; FW.setPreferredSize(new Dimension(65, 30));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FW.setBorder(BorderFactory.createEmptyBorder());<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FW.setContentAreaFilled(false);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FWicon = createButtonIcon(&quot;FW.jpg&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FW.setIcon(FWicon);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FW.addActionListener(blistener);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FW.setActionCommand(&quot;FW&quot;);<br />
<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BW = new JButton();<br />
&nbsp; &nbsp; &nbsp; //&nbsp; &nbsp; &nbsp; FW.setPreferredSize(new Dimension(65, 30));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BW.setBorder(BorderFactory.createEmptyBorder());<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BW.setContentAreaFilled(false);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BWicon = createButtonIcon(&quot;BW.jpg&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BW.setIcon(BWicon);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BW.addActionListener(blistener);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BW.setActionCommand(&quot;BW&quot;);<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ST = new JButton();<br />
&nbsp; &nbsp; &nbsp; //&nbsp; &nbsp; &nbsp; FW.setPreferredSize(new Dimension(65, 30));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ST.setBorder(BorderFactory.createEmptyBorder());<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ST.setContentAreaFilled(false);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; STicon = createButtonIcon(&quot;ST.jpg&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GOicon = createButtonIcon(&quot;GO.jpg&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ST.setIcon(STicon);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ST.addActionListener(blistener);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ST.setActionCommand(&quot;ST&quot;);<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (bt == 2) { // two buttons<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; buttonPanel.add(BW);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; buttonPanel.add(FW);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FW.setEnabled(true);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BW.setEnabled(true);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else { // three buttons<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; buttonPanel.add(BW);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; buttonPanel.add(ST);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; buttonPanel.add(FW);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ST.setEnabled(true);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ST.setIcon(STicon);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BW.setEnabled(false);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FW.setEnabled(false);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; southPanel.add(textlabel);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; southPanel.add(buttonPanel);<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Border etched = BorderFactory.createEtchedBorder(bluecolor,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bluecolor);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  // buttonPanel.setBorder(etched);<br />
&nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; mainPanel.add(DS, BorderLayout.CENTER);<br />
&nbsp; &nbsp; &nbsp; &nbsp; mainPanel.add(southPanel, BorderLayout.SOUTH);<br />
&nbsp; &nbsp;  //&nbsp;  mainPanel.add(northPanel, BorderLayout.NORTH); // for monitoring<br />
&nbsp; &nbsp; &nbsp; &nbsp; return mainPanel;<br />
&nbsp; &nbsp; }<br />
<br />
<br />
<br />
&nbsp; &nbsp; private ImageIcon createButtonIcon (String Iname)&nbsp; { // load button icons<br />
&nbsp; &nbsp; &nbsp; &nbsp; ImageIcon Iicon = null;<br />
&nbsp; &nbsp; &nbsp; &nbsp; try {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; URL url = new URL(<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; iconPath + File.separator +&nbsp; Iname);<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Iicon = new ImageIcon(url);<br />
&nbsp; &nbsp; &nbsp; &nbsp;  }<br />
&nbsp; &nbsp; &nbsp; &nbsp;  catch (IOException e) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(&quot; path error &quot;&nbsp; +<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;images&quot; + Iname);<br />
&nbsp; &nbsp; &nbsp; &nbsp;  }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; return Iicon;<br />
&nbsp; &nbsp; }<br />
<br />
<br />
<br />
&nbsp; &nbsp; public void start() {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (runner == null); {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; runner = new Thread(this);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; runner.start();<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(&quot;Thread started.&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DS.getSlideImage(imagefiles.get(0));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; repaint();<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; public void stop() {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (runner != null) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; runner.interrupt();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; runner = null;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; stoptimer();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(&quot;Thread successfully stopped.&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(&quot;timer stopped &quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; public void destroy() {<br />
<br />
&nbsp; &nbsp; }<br />
<br />
<br />
&nbsp; &nbsp; public void run() { // runs the image timer<br />
&nbsp; &nbsp; &nbsp; &nbsp; timer(slidetime); // image timer set by tag<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (timerflag)&nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; starttimer();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(&quot;Timer Started&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; else System.out.println(&quot;Timer NOT Started&quot;);<br />
&nbsp; &nbsp; }<br />
<br />
<br />
<br />
&nbsp; &nbsp; public void timer(int st)&nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; time = new Timer((1000 * st), timelistener);<br />
&nbsp; &nbsp; &nbsp; &nbsp; time.setRepeats(true);<br />
&nbsp; &nbsp; }<br />
&nbsp; &nbsp; public void starttimer() {<br />
&nbsp; &nbsp; &nbsp; &nbsp;  time.start();<br />
&nbsp; &nbsp; }<br />
&nbsp; &nbsp; public void stoptimer() {<br />
&nbsp; &nbsp; &nbsp; &nbsp;  time.stop();<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; class&nbsp; TimeSetter implements ActionListener { // timer listener for<br />
&nbsp; &nbsp; &nbsp; &nbsp; public void actionPerformed(ActionEvent event)&nbsp; { // automatic image display<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; imagecount++;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (imagecount &gt;= maximages) imagecount = 0;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DS.getSlideImage( imagefiles.get(imagecount));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; repaint();<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; }<br />
<br />
<br />
<br />
&nbsp; &nbsp; private class ButtonDialog implements ActionListener { // button listener<br />
<br />
&nbsp; &nbsp; &nbsp;  public void actionPerformed(ActionEvent e) {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  String cmd = e.getActionCommand();<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (e.getSource() == FW) { // forwards<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; imagecount++;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (imagecount &gt;= maximages) imagecount = 0;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DS.getSlideImage( imagefiles.get(imagecount)) ;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; repaint();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (e.getSource() == BW) { // backwards<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (imagecount &lt;= 1) imagecount = maximages;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; imagecount--;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DS.getSlideImage( imagefiles.get(imagecount)) ;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; repaint();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ((cmd.equals(&quot;ST&quot;) || (cmd.equals(&quot;GO&quot;)))) { // stop start button<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  if (cmd.equals(&quot;ST&quot;)) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  stoptimer();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  BW.setEnabled(true);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  FW.setEnabled(true);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ST.setIcon(GOicon);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ST.setActionCommand(&quot;GO&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  else {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  starttimer();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  BW.setEnabled(false);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  FW.setEnabled(false);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ST.setIcon(STicon);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ST.setActionCommand(&quot;ST&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  }<br />
&nbsp; &nbsp; &nbsp; }<br />
&nbsp;  }<br />
<br />
<br />
&nbsp; &nbsp; private File checkImageFolders(String currentf) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; // There are two image folders the first is called slideshowImages<br />
&nbsp; &nbsp; &nbsp; &nbsp; // at the codebase (classes).<br />
&nbsp; &nbsp; &nbsp; &nbsp; // the second folder (name currentf) is set by the applet tag<br />
&nbsp; &nbsp; &nbsp; &nbsp; // this folder contains all the images for display<br />
&nbsp; &nbsp; &nbsp; &nbsp; boolean flag = false;<br />
<br />
&nbsp; &nbsp; &nbsp; // System.out.println(&quot; getcodebase &quot; + getCodeBase().toString());<br />
&nbsp; &nbsp; &nbsp; // label1.setText(&quot; codebase &quot; + getCodeBase());<br />
&nbsp; &nbsp; &nbsp; // label2.setText(&quot; documentbase &quot; + getDocumentBase());<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; try {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  imagePath = new URL(getCodeBase(), &quot;slideshowImages&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  iconPath&nbsp; = new URL(getCodeBase(), &quot;slideshowapplet&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  flag = true;<br />
&nbsp; &nbsp; &nbsp; &nbsp; } catch (IOException ex) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(&quot;can not read folder slideshowImages : &quot; + imagePath);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(ex.getMessage());<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; flag = false;<br />
&nbsp; &nbsp; &nbsp; &nbsp; } imagePath = null;<br />
<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; try {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  imagePath = new URL(getCodeBase(), &quot;slideshowImages&quot; +<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  File.separator + currentf);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  flag = true;<br />
&nbsp; &nbsp; &nbsp; &nbsp; } catch (IOException ex) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(&quot;can not read current image folder : &quot; + currentf);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(ex.getMessage());<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; flag = false;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; try {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; folder = new File(imagePath.toURI());<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(&quot; try &quot; + folder);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; flag = true;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; catch(URISyntaxException e) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; folder = new File(imagePath.getPath());<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(&quot; catch &quot; + folder);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; flag = false;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (folder.exists()) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(&quot; yes file folder exsists &quot; + folder);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; flag = true;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; else&nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(&quot; no file folder &quot; + folder);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; flag = false;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp;  System.out.println(&quot; the flag set to &quot; + flag +<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot; the folder content &quot; + imagePath.toString());<br />
&nbsp; &nbsp; &nbsp;  //&nbsp; label3.setText(&quot; appletpath &quot; + appletp);<br />
&nbsp; &nbsp; &nbsp;  //&nbsp; label4.setText(&quot; folderpath &quot; + folder);<br />
&nbsp; &nbsp; &nbsp; &nbsp;  if (flag)<br />
&nbsp; &nbsp; &nbsp; &nbsp;  return folder;<br />
&nbsp; &nbsp; &nbsp; &nbsp;  else<br />
&nbsp; &nbsp; &nbsp; &nbsp;  return null;<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; private void doListofImagefiles( File currentfpath)&nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; // storing the present files of the folder<br />
&nbsp; &nbsp; &nbsp; &nbsp; // into a temporal array for checking<br />
&nbsp; &nbsp; &nbsp; &nbsp; if ( currentfpath != null)&nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; File&#91;&#93; listOfFiles = currentfpath.listFiles();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //the array list will contain the correct files<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; imagefiles = new ArrayList();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(); System.out.println();<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (int i = 0; i &lt; listOfFiles.length; i++)&nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; String file = listOfFiles&#91;i&#93;.getName();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.print(i + &quot;&nbsp; &gt; &quot; + file );<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // check for files against folders<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (listOfFiles&#91;i&#93;.isFile()) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //adding the checked correct image files<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (checkImageType(listOfFiles&#91;i&#93;))&nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  imagefiles.add(file);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; maximages = imagefiles.size();<br />
&nbsp; &nbsp; &nbsp; &nbsp; System.out.println(&quot; the array list length is: &quot; + maximages);<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; else<br />
&nbsp; &nbsp; &nbsp; &nbsp; System.out.println(&quot; no array setup: &quot; + currentfpath);<br />
&nbsp; &nbsp; }<br />
<br />
<br />
&nbsp; &nbsp; private boolean checkImageType (File f)&nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; boolean flag = false;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; String fl = ft.getContentType(f);<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; String type = fl.split(&quot;/&quot;)&#91;0&#93;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(type.equals(&quot;image&quot;))&nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(&quot;&nbsp; Is an image:&nbsp; &lt;&quot; +<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fl.split(&quot;/&quot;)&#91;1&#93; + &quot;&gt;&nbsp;  &quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return true;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else&nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(&quot;&nbsp; Is NOT an image&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return false;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; }<br />
<br />
<br />
&nbsp; &nbsp; // inner class that draws the photos on a panel<br />
<br />
&nbsp; &nbsp; class DisplayScreen extends JPanel {<br />
&nbsp; &nbsp; &nbsp; &nbsp; private Image img;<br />
<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; public DisplayScreen() {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //&nbsp; getSlideImage(imagefiles.get(0));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //&nbsp; repaint();<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; public void getSlideImage(Object imf)&nbsp; &nbsp; &nbsp; {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; try {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  URL url = new URL( imagePath +<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  File.separator + (String) imf);<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  img = ImageIO.read(url);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  scaleImage(img.getWidth(null), img.getHeight(null));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  if (textflag)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  textlabel.setText(&quot; Reff. &quot; + (imagecount + 1));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  //&nbsp; label5.setText(&quot; image file &quot; + imf);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; catch (IOException e) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(&quot; path error &quot;&nbsp; + iconPath +<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  File.separator + (String) imf);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp;  }<br />
<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; public void scaleImage(int w, int h)&nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  imageWidth = screenx;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  imageHeight = screeny;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  double rat = 1.0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //&nbsp;  if (Math.abs(w-imageWidth) &gt;= Math.abs(h-imageHeight)) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  if ((w-imageWidth) &gt;= (h-imageHeight)) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  rat = (double) imageWidth / (double)&nbsp; w;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  else&nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  rat = (double) imageHeight / (double) h;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  imageWidth = (int) ( w * rat);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  imageHeight = (int) ( h * rat);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //&nbsp; label2.setText(&quot; X &quot; + w + &quot; Y &quot; + h);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //&nbsp; label3.setText(&quot; scaleX &quot; + imageWidth + &quot; scaleY &quot; + imageHeight);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //&nbsp; label1.setText(&quot; screenY &quot; + screenx + &quot; screenY &quot; + screeny);<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; public void paint(Graphics g) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Graphics2D g2 = (Graphics2D)g;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; g2.setPaint(Color.red);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  //&nbsp;  Rectangle rect = new Rectangle(leftcornerX,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  //&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  leftcornerY, screenx, screeny);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  //&nbsp;  g2.draw(rect);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; g2.setColor(colorset);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; g2.fillRect(leftcornerX,leftcornerY, screenx,screeny);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; g2.drawImage(img, leftcornerX,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; leftcornerY, imageWidth, imageHeight, null);<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
<br />
&nbsp; &nbsp; } // end inner class<br />
<br />
}</code><hr />
</div></div>

]]></content:encoded>
			<category domain="http://www.java-forums.org/java-applets/">Java Applets</category>
			<dc:creator>willemjav</dc:creator>
			<guid isPermaLink="true">http://www.java-forums.org/java-applets/75695-java-lang-illegalargumentexception-uri-scheme-not-file.html</guid>
		</item>
		<item>
			<title>Uploading files to IIS  from Applet</title>
			<link>http://www.java-forums.org/java-applets/74679-uploading-files-iis-applet.html</link>
			<pubDate>Thu, 30 May 2013 12:42:53 GMT</pubDate>
			<description>Hi 
 
I am trying to upload a file using Applet to the IIS. Which is the best mechanism to do this ? I am from .NET background and got some sample...</description>
			<content:encoded><![CDATA[<div>Hi<br />
<br />
I am trying to upload a file using Applet to the IIS. Which is the best mechanism to do this ? I am from .NET background and got some sample codes, but getting 'Null pointer exception'  . Can i get the some sample code to refer ?   I am trying to invoke the applet (signed) in my asp.net application and upload file to the server.<br />
<br />
                               HttpURLConnection theUrlConnection = (HttpURLConnection) oUploadURL.openConnection();<br />
			        //theUrlConnection.connect();<br />
			        theUrlConnection.setDoOutput(true);<br />
			        theUrlConnection.setDoInput(true);<br />
			        theUrlConnection.setUseCaches(false);<br />
			        theUrlConnection.setConnectTimeout(10000);<br />
			        theUrlConnection.setRequestMethod(&quot;POST&quot;);<br />
			        <br />
			        <br />
			        theUrlConnection.setChunkedStreamingMode(1024);<br />
<br />
			        theUrlConnection.setRequestProperty(&quot;Content-Type&quot;, &quot;multipart/form-data; boundary=&quot;<br />
			        + Boundary);<br />
<br />
			        theUrlConnection.setRequestProperty(&quot;Connection&quot;, &quot;Keep-Alive&quot;);<br />
			        theUrlConnection.setRequestProperty(&quot;Keep-Alive&quot;, &quot;header&quot;);<br />
			      <br />
			        <br />
			        DataOutputStream httpOut= null;<br />
			       // DataOutputStream httpOut = new DataOutputStream(theUrlConnection.getOutputStream(  ));<br />
			        try<br />
			        {<br />
			        	getout = theUrlConnection.getOutputStream();  (Here i am getting the error)<br />
			        	httpOut = new DataOutputStream(getout); <br />
			        }<br />
			        catch(IOException eX)<br />
			        {<br />
			        	eX.printStackTrace();<br />
			        }<br />
<br />
Regards<br />
Dominic</div>

]]></content:encoded>
			<category domain="http://www.java-forums.org/java-applets/">Java Applets</category>
			<dc:creator>dominicthoppil</dc:creator>
			<guid isPermaLink="true">http://www.java-forums.org/java-applets/74679-uploading-files-iis-applet.html</guid>
		</item>
		<item>
			<title>How to enforce java applet to use server vm on windows?</title>
			<link>http://www.java-forums.org/java-applets/74662-how-enforce-java-applet-use-server-vm-windows.html</link>
			<pubDate>Thu, 30 May 2013 00:20:33 GMT</pubDate>
			<description>I recently made an applet game and noticed that its performance is always better on linux than windows. (same machine,  same browser, same version of...</description>
			<content:encoded><![CDATA[<div>I recently made an applet game and noticed that its performance is always better on linux than windows. (same machine,  same browser, same version of JRE).   It turned out that on linux, java server vm is used whereas on windows the client vm is used.  <br />
<br />
My question is there anyway to force the java applet launcher to use server vm on windows? Thanks in advance!</div>

]]></content:encoded>
			<category domain="http://www.java-forums.org/java-applets/">Java Applets</category>
			<dc:creator>phu004</dc:creator>
			<guid isPermaLink="true">http://www.java-forums.org/java-applets/74662-how-enforce-java-applet-use-server-vm-windows.html</guid>
		</item>
		<item>
			<title>about to launch a new website with several applets</title>
			<link>http://www.java-forums.org/java-applets/74268-about-launch-new-website-several-applets.html</link>
			<pubDate>Thu, 23 May 2013 20:39:49 GMT</pubDate>
			<description>Am I going to have trouble when launch a website with several photo slide applets? 
I mean people will not be able to see the photos because: 
-do...</description>
			<content:encoded><![CDATA[<div>Am I going to have trouble when launch a website with several photo slide applets?<br />
I mean people will not be able to see the photos because:<br />
-do not have java installed?<br />
-there will be security issues where users have to grant permission which the refuse;<br />
-or what ever reason I am not thinking of (I read some comment ones saying:<br />
&quot;where have all the applets gone?&quot;<br />
<br />
applets were very popular about 5 years ago, right?<br />
Has that changed?<br />
Did eg java-script take over some stuff?<br />
(Am I political incorrect to ask these things at this forum.....)</div>

]]></content:encoded>
			<category domain="http://www.java-forums.org/java-applets/">Java Applets</category>
			<dc:creator>willemjav</dc:creator>
			<guid isPermaLink="true">http://www.java-forums.org/java-applets/74268-about-launch-new-website-several-applets.html</guid>
		</item>
		<item>
			<title>Applet Security Settings</title>
			<link>http://www.java-forums.org/java-applets/74232-applet-security-settings.html</link>
			<pubDate>Thu, 23 May 2013 07:46:47 GMT</pubDate>
			<description>I have an applet working fine with Firefox 3.6.13 and Java -1.6.0 (on linux) 
On Win7 and Firefox 18.0.1 and Java 7u21 I get a pop-up: 
Apllication...</description>
			<content:encoded><![CDATA[<div>I have an applet working fine with Firefox 3.6.13 and Java -1.6.0 (on linux)<br />
On Win7 and Firefox 18.0.1 and Java 7u21 I get a pop-up:<br />
Apllication Blocked by Security Settings<br />
Your security settings have blocked a local application from running.<br />
<br />
How do I solve this?</div>

]]></content:encoded>
			<category domain="http://www.java-forums.org/java-applets/">Java Applets</category>
			<dc:creator>dendeezen</dc:creator>
			<guid isPermaLink="true">http://www.java-forums.org/java-applets/74232-applet-security-settings.html</guid>
		</item>
		<item>
			<title><![CDATA[applet <-> servlet <-> DB Engine]]></title>
			<link>http://www.java-forums.org/java-applets/74150-applet-servlet-db-engine.html</link>
			<pubDate>Wed, 22 May 2013 02:36:17 GMT</pubDate>
			<description><![CDATA[I'm making an unsigned java applet which will be embedded in a browser. My applet is required to receive and send data to a database. 
 
According to...]]></description>
			<content:encoded><![CDATA[<div>I'm making an unsigned java applet which will be embedded in a browser. My applet is required to receive and send data to a database.<br />
<br />
According to my research, I've came to conclude that I should avoid using jdbc for security reasons. Instead, I should use this method:<br />
applet &lt;-&gt; servlet &lt;-&gt; DB Engine<br />
<br />
No matter what thread I go to or what website I visit, most of my results simply tells me how to do the above method. The problem is that I have no idea how to start. Perhaps this is because my knowledge in servlets is so limited.<br />
<br />
I do not know where or how to start to learn about servlets or how to use the above method because it seems that tutorials are hard to find.<br />
Thus I'd like to ask for help in finding decent tutorials, examples or links.<br />
<br />
Thanks in advance.</div>

]]></content:encoded>
			<category domain="http://www.java-forums.org/java-applets/">Java Applets</category>
			<dc:creator>Links</dc:creator>
			<guid isPermaLink="true">http://www.java-forums.org/java-applets/74150-applet-servlet-db-engine.html</guid>
		</item>
		<item>
			<title><![CDATA[Help T T   i'm so frustrating now]]></title>
			<link>http://www.java-forums.org/java-applets/74094-help-t-t-im-so-frustrating-now.html</link>
			<pubDate>Tue, 21 May 2013 15:07:25 GMT</pubDate>
			<description>import java.awt.*; 
import java.awt.event.*; 
import javax.swing.*; 
import javax.swing.border.*; 
import javax.swing.event.*; 
 
public class...</description>
			<content:encoded><![CDATA[<div>import java.awt.*;<br />
import java.awt.event.*;<br />
import javax.swing.*;<br />
import javax.swing.border.*;<br />
import javax.swing.event.*;<br />
<br />
public class Battleship extends JFrame{<br />
	<br />
	public static void main( String args[] ) {<br />
		new Battleship();<br />
<br />
	}<br />
	<br />
	 Canvas canvas=new Canvas() {<br />
	        public void paint(Graphics g) {<br />
	            super.paint(g);<br />
	            Graphics2D g2d=(Graphics2D) g;<br />
	    		int x1Ver=150,y1Ver=200,y2Ver=500; <br />
	    		int x1Hor=150,y1Hor=200,x2Hor=450;<br />
	    		for(int draw=0;draw&lt;11;draw++){<br />
	    			g.drawLine(x1Ver, y1Ver, x1Ver, y2Ver);<br />
	    			g.drawLine(x1Hor, y1Hor, x2Hor, y1Hor);<br />
	    			x1Ver+=30;<br />
	    			y1Hor+=30;<br />
	    		}<br />
	    		<br />
	        }<br />
	    };<br />
	<br />
		public Battleship(){<br />
			JFrame f=new JFrame(&quot;Battleship&quot;);<br />
			f.setTitle(&quot;Battleship&quot;);<br />
			f.setSize(1000, 900);<br />
			f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);<br />
			f.setVisible(true);<br />
			f.setResizable(false);<br />
			f.setLocationRelativeTo(null);<br />
			f.add(new GraphicsSurface());<br />
<br />
			JButton close=new JButton(&quot;Close&quot;);<br />
			close.setBounds(500, 500, 100, 100);<br />
			<br />
			JPanel panel=new JPanel();<br />
			panel.setLayout(null);<br />
			panel.setVisible(true);<br />
			panel.add(close);<br />
			f.getContentPane().add(panel);<br />
<br />
			panel.add(close);<br />
			<br />
<br />
		}<br />
<br />
<br />
<br />
	}<br />
<br />
<br />
<br />
<br />
i wrote this, but i don't understand why java won't draw the shape for me. Please enlighten me! Thanks!!</div>

]]></content:encoded>
			<category domain="http://www.java-forums.org/java-applets/">Java Applets</category>
			<dc:creator>ren66a66</dc:creator>
			<guid isPermaLink="true">http://www.java-forums.org/java-applets/74094-help-t-t-im-so-frustrating-now.html</guid>
		</item>
	</channel>
</rss>
