
Signature
Today I want to do something better than when I did it yesterday
> We're going to be developing a large app which will contain over 100 screens
> for the user. Initially we thought that this would mean many JFrames (i.e.
> each screen is a JFrame).
Check your design! A program with more than 100 windows
will end up as a disaster for your customer. No matter
how they are technically implemented.
Put the vital information from you data model
into main window(s) (i.e. JFrames), and leave secondary
information in transient non-modal dialogs (JDialog).
If you end up with more than a few main windows there
is something wrong with your data model.
The advice from your "Sun consultant" is strange as it
means you cannot have multilpe windows open simultaneously.
Also I doubt his conclusion: Unless you have all 100 windows
open simultaneously (and if you need, see above), the garbage
collector will clean the mess as you go.
And as said before: That something is technically
feasable does not necesserily mean it is a good idea:
Please, please do not use internal frames!
Shane Mingins - 03 Sep 2004 02:16 GMT
> > We're going to be developing a large app which will contain over 100 screens
> > for the user. Initially we thought that this would mean many JFrames (i.e.
[quoted text clipped - 3 lines]
> will end up as a disaster for your customer. No matter
> how they are technically implemented.
I assume you are meaning displaying 100 windows at once??? Which would be
indeed a disaster ;-)
I was meaning that we have over 100 screens .... only one displayed at a
time ... and that we thought that this would mean coding 100 JFrames ....
and now it looks like it will mean coding 100 JPanels.
There are a certain subset of these 100 that will be used often and so we
may instantiate these upon application startup and leave the rest to
lazy-load.
> The advice from your "Sun consultant" is strange as it
> means you cannot have multilpe windows open simultaneously.
> Also I doubt his conclusion: Unless you have all 100 windows
> open simultaneously (and if you need, see above), the garbage
> collector will clean the mess as you go.
He was saying that because a JFrame has to be rendered (not sure if that is
quite the right word) as a native component of the o/s it uses more resource
than a lightweight component like a JPanel.
Cheers
Shane