Can someone help me if System.out.println does not work in applet or
toher reasons?
Thanks,
Yuandan
--
*************************************************************************
Arnaud DENAGBE
arnaud....@free.fr
arnaud...@onetelnet.fr
arnaud....@mail.dotcom.fr
http://arnaud.denagbe.free.fr
Pas de Bill... Linux est la!!!
*************************************************************************
Yuandan <ydz...@iastate.edu> a écrit dans le message :
3995824E...@iastate.edu...
Yuandan wrote:
> I try to print out a string using System.out.println("Hello World!") in
> applet. The compilation is ok, but when viewing the applet using a
> netscape browser, it does not show any string. The browser is java
> enabled.
>
> Can someone help me if System.out.println does not work in applet or
> toher reasons?
>
> Thanks,
>
> Yuandan
Using System.out.println in an applet will print to the console, which is
not the main screen of the browser. If you want to see the console, you
have to instruct the browser to show you the java console. You do this in
Netscape by going to communicator/tools/java console
Daniel
public void paint(Graphics screen)
{
screen.drawString("Hello World");
}
Bezdomny
"Yuandan" <ydz...@iastate.edu> wrote in message
news:3995824E...@iastate.edu...
Arnaud Denagbe schrieb:
> System.out.println uses the standard output to print texts, generally
> the standard output is the shell from which you started your application.
> But in case of applets you don't have any shell so you can't see anything.
> Instead of using the System.out, print your text on your applet's frame.
>
> --
> *************************************************************************
> Arnaud DENAGBE
> arnaud....@free.fr
> arnaud...@onetelnet.fr
> arnaud....@mail.dotcom.fr
> http://arnaud.denagbe.free.fr
> Pas de Bill... Linux est la!!!
> *************************************************************************
> Yuandan <ydz...@iastate.edu> a écrit dans le message :
> 3995824E...@iastate.edu...
> > I try to print out a string using System.out.println("Hello World!") in
> > applet. The compilation is ok, but when viewing the applet using a
> > netscape browser, it does not show any string. The browser is java
> > enabled.
> >
> > Can someone help me if System.out.println does not work in applet or
> > toher reasons?
> >
> > Thanks,
> >
> > Yuandan
> >
> >
> >
--
la lettre seule tue, mais l' ESPRIT des lettres vivifie
I think there is no text based output window available. There is only such a
window of you execute your applet by using appletviewer. The output is sent
to the window from which you launched appletviewer.
You write "It does not show any string". Where do you expect or want to
appear the output which you otherwise would send to an output window?
> Can someone help me if System.out.println does not work in applet or
> toher reasons?
System.out.println does work in an applet, and I often use that command for
testing my applets because I am not very familiar with jdb and the -debug
flag of appletviewer.
--
Hans Kamp (Win2000)
in...@hanskamp.com
www.hanskamp.com
On the contrary - most browsers with applet integration have a console
window. Certainly IE and Netscape do.
--
Jon Skeet - sk...@pobox.com
http://www.pobox.com/~skeet/
Hans Kamp schrieb:
> "Yuandan" <ydz...@iastate.edu> schreef in bericht
> news:3995824E...@iastate.edu...
> > I try to print out a string using System.out.println("Hello World!") in
> > applet. The compilation is ok, but when viewing the applet using a
> > netscape browser, it does not show any string. The browser is java
> > enabled.
>
> I think there is no text based output window available. There is only such a
> window of you execute your applet by using appletviewer. The output is sent
> to the window from which you launched appletviewer.
>
> You write "It does not show any string". Where do you expect or want to
> appear the output which you otherwise would send to an output window?
>
> > Can someone help me if System.out.println does not work in applet or
> > toher reasons?
>
> System.out.println does work in an applet, and I often use that command for
> testing my applets because I am not very familiar with jdb and the -debug
> flag of appletviewer.
>
> --
>
> Hans Kamp (Win2000)
> in...@hanskamp.com
> www.hanskamp.com
--
good luck
Make shure your Java console is enabled in your browser prefs..