Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / January 2005

Tip: Looking for answers? Try searching our database.

Problem with JPopupMenu (I think...)

Thread view: 
hiwa - 19 Jan 2005 23:40 GMT
One of the top five worst practices for GUI programming:
-Instantiating a component in an event listener.

It also belongs to the top five never-do-it practices for GUI programming.

BTW, is accessing client's System.out in an applet legal? I'm
not so sure about it.
Andrew Thompson - 20 Jan 2005 08:54 GMT
> BTW, is accessing client's System.out in an applet legal?

No[1], not unless it is signed.

[1] <http://mindprod.com/jgloss/applet.html#RESTRICTIONS>

Signature

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

Roland - 21 Jan 2005 11:02 GMT
>>BTW, is accessing client's System.out in an applet legal?
>
> No[1], not unless it is signed.
>
> [1] <http://mindprod.com/jgloss/applet.html#RESTRICTIONS>

I think that needs some further clarification.

In an unsigned applet you *can* print to System.out/System.err (using
System.out.println(), System.err.print(foo) etc.). The output will show
up in the Java console.
But you cannot change System.out/System.err to your own PrintStream.
Calling System.setOut(PrintStream) or System.setErr(PrintStream) in an
unsigned applet (with default security permissions) will throw a
security exception.

Signature

Regards,

Roland de Ruiter
  ___      ___
 /__/ w_/ /__/
/  \ /_/ /  \

blue - 20 Jan 2005 15:07 GMT
I tried changing the code so that no components are instantiated in the
event listeners, this did not help.

Thanks for the insight? though.

Frank

> One of the top five worst practices for GUI programming:
> -Instantiating a component in an event listener.
[quoted text clipped - 3 lines]
> BTW, is accessing client's System.out in an applet legal? I'm
> not so sure about it.
RC - 20 Jan 2005 21:54 GMT
All System.out will go to Java console for Applets.

> I tried changing the code so that no components are instantiated in the
> event listeners, this did not help.
[quoted text clipped - 10 lines]
> > BTW, is accessing client's System.out in an applet legal? I'm
> > not so sure about it.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.