Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > why this Applet fails

Reply
Thread Tools

why this Applet fails

 
 
Madhur Ahuja
Guest
Posts: n/a
 
      11-03-2004
Hello

This Applet runs fine as an application but
does not displays output in the console window as
it does in the application.

Any ideas?


import java.applet.*;
import java.awt.*;


public class Applet2 extends Applet
{

public Applet2()
{

Thread ff=new Thread( new Runnable()
{

public void run()
{
for(int i=0;i<10000;++i)
{
System.out.println(i);

try
{

Thread.sleep(100);
}
catch(Exception e)
{
e.printStackTrace();
}
}
}


});
ff.start();
}

public static void main(String args[])
{
new Applet2();
}

}

--
Madhur Ahuja [madhur<underscore>ahuja<at>yahoo<dot>com]

Homepage
http://madhur.netfirms.com






 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      11-03-2004
On Wed, 3 Nov 2004 16:32:16 +0530, Madhur Ahuja wrote:

> This Applet runs fine as an application but
> does not displays output in the console window ....


What browser? What Java?
<http://www.physci.org/pc/property.jsp?prop=java.version>

> ...as it does in the application.


It displays continuous numbers when run from AppletViewer.
Ditto for IE 6 running Java 1.5.0.

What did I (or you) miss?

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane
 
Reply With Quote
 
 
 
 
Madhur Ahuja
Guest
Posts: n/a
 
      11-03-2004
Andrew Thompson <(E-Mail Removed)> wrote:
> On Wed, 3 Nov 2004 16:32:16 +0530, Madhur Ahuja wrote:
>
>> This Applet runs fine as an application but
>> does not displays output in the console window ....

>
> What browser? What Java?
> <http://www.physci.org/pc/property.jsp?prop=java.version>
>
>> ...as it does in the application.

>
> It displays continuous numbers when run from AppletViewer.
> Ditto for IE 6 running Java 1.5.0.
>
> What did I (or you) miss?


Thanks, the problem was that I was using the old class file.
My Bad. Thanks !

--
Madhur Ahuja [madhur<underscore>ahuja<at>yahoo<dot>com]

Homepage
http://madhur.netfirms.com






 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      11-04-2004
On Wed, 3 Nov 2004 23:47:22 +0530, Madhur Ahuja wrote:

> Thanks, the problem was that I was using the old class file.


Yes, applet testing is a pain with 'class caching' and all.

Have you figured how to flush the cache of classes?

> My Bad. Thanks !


You're welcome.

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane
 
Reply With Quote
 
 
 
Reply

Thread Tools

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
why why why why why Mr. SweatyFinger ASP .Net 4 12-21-2006 01:15 PM
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger ASP .Net 2 12-02-2006 03:46 PM
Constant.t fails 240 of 272 tests and recurs.t fails 1 of 25 tests on HPUX using perl 5.8.7 dayo Perl Misc 11 12-16-2005 09:09 PM
slideshow fails, Firefox debugger also fails lkrubner@geocities.com Javascript 2 12-23-2004 06:22 PM
Forms Authentication Fails Between ASP.NET 1.0 and 1.1 Applications (Cookie Decryption Fails) John Saunders ASP .Net 1 11-18-2003 03:25 PM



Advertisments