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 / November 2004

Tip: Looking for answers? Try searching our database.

Applet - One or Many

Thread view: 
paul.foreman - 05 Nov 2004 20:38 GMT
Hi,
   I have a very newbi question on the construction of a Application for
which I have constructed an Applet front end.

I would like some advice on the number of applets in my application.

I have the initial window as an applet, from which the user can navigate to
other
windows. The user presses a button on the initial applet window which runs
the code:
 PersonView personV = new PersonView();
 personV.pack();
 personV.setVisible(true);
The class PersonView has an applet constructor:
public class PersonView extends Frame {
.
 public PersonView() {
   try {
     jbInit();
   }
   catch(Exception e) {
     e.printStackTrace();
   }
.
.
}
If it helps clarify what I am trying to acheive I do need to pass
information to the new window and on occasion pass information back from the
new window to the original window.

Is this approach ok or should I be creating an instance of a new window with
a conventional constructor and without the jbInit() method?

Does the each applet create its own thread?

Any references which deal with this topic would be appreciated.

Regards

Paul
Andrew Thompson - 06 Nov 2004 16:16 GMT
This thread follows from one on c.l.j.p., for reference..
<http://google.com/groups?selm=ke43fd4dnrun.ksi4v0rl3fj3.dlg@40tude.net>

>     I have a very newbi question on the construction of a Application for
> which I have constructed an Applet front end.

OK - I can see you answered some of the questions I asked
you in my original response, but you also re-asked a question
about threads that I answered in the original thread.

> I would like some advice on the number of applets in my application.
>
> I have the initial window as an applet, from which the user can navigate to
> other
> windows.

I asked if you were using 'showDocument' to produce new web-pages, but..

>..The user presses a button on the initial applet window which runs
> the code:
...

> The class PersonView has an applet constructor:

What do you mean by that?

> public class PersonView extends Frame {

This is a frame. (obviously)
So where's the applet?

> If it helps clarify what I am trying to acheive I do need to pass
> information to the new window

If you mean Frames, please say Frames, ditto web-pages (with applets)
Dialogs or Windows.  We are discussing technical matters and you need
to be precise.

>..and on occasion pass information back from the
> new window to the original window.

Passing information between (let's call them) UI components
in a web-application can be 'linear' - where there is only ever
one web-page open, or it might be that a number of web-pages
are open at any time (each in it's own browser window, or
collectively in a frameset)

The 'linear' approach would probably require server-side help
to pass the information between the different web-pages.

The non-linear approach would become a maintenance nightmare if
you intend to rely on new or pop-up windows (containing web-pages),
and it would present usability problems if you design it in a frameset.

> Is this approach ok or should I be creating an instance of a new window with
> a conventional constructor and without the jbInit() method?
>
> Does the each applet create its own thread?

Yes.  Each applet might have a number of threads, and these
are distinct from the threads of every other applet.

OTOH, why are you asking about threads in applets?  I suspect
your question is based on a false understanding, but without
knowing what made you ask, it is difficult to determine what
that is.

> Any references which deal with this topic would be appreciated.

I am still not clear enough on the actual problem to point
you to further resources.

As an aside, this was also *not* the group I advised you to post to!

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



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.