AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

A DesktopPane and InternalFrame Discussion...

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java GUI Toolkits
View previous topic :: View next topic  
Author Message
D.M.Jackson
Guest





PostPosted: Mon May 07, 2007 7:10 am    Post subject: A DesktopPane and InternalFrame Discussion... Reply with quote



Greetings,

I say discussion because the answer to no single question is likely
to cover the troubles I'm having. Though I know ambiguity is frowned upon
on programming newsgroups, I beg the patience of the members here and hope
to initiate a useful discussion of MDI apps in java... and swing in
particular.

I observe that I am able to add a jPanel to a jDesktopPane, but not a
jFrame. Why not?

I wanted to set the "undecorated" property in my jInternalFrame to TRUE, but
alas, there is no such property displayed by a jInternalFrame. I'm looking
for suggestions on rolling my own windows to use inside of a jDesktopPane
that would allow me to expose more functionality. I've searched the
internet for tutorials on MDI java apps and mostly they stop at reitterating
the same basic jDesktopPane / jInternalFrame tutorial where you pop a few
windows up inside of a DesktopPane.

I want to impliment a basic pluggable architecture based on using
InternalFrames but I want my mainapp to display and handle a certain amount
of functionality while interacting with these plugins based on
InternalFrames. Could I just as easily (probably more easily) use the
DesktopPane to host jPanels in it's client area within the mainapp, or is
there some reason that they are not suitable for such purposes...hence the
need for jInternalFrames.

Any more indepth tutorials out there on java MDI that someone would be
willing to share?

Thanks,
Mark
Back to top
D.M.Jackson
Guest





PostPosted: Mon May 07, 2007 7:10 am    Post subject: Re: A DesktopPane and InternalFrame Discussion... Reply with quote



"Andrew Thompson" <u32984@uwe> wrote in message news:71ce00fa6858a@uwe...
Quote:
D.M.Jackson wrote:

If you actually mean JPanel, JDesktopPane and JFrame
(classes in the J2SE - cannot speak for the ones you
mentioned), then I will add that I am entirely capable of
adding a JPanel (or many) to a JFrame (JDialog,
JOptionPane, JWindow, JApplet etc.).

I find that I am unable to add a JFrame to a JDesktopPane and get anything
useful during design time.



Quote:
I cannot immediately explain why you are not able to
do it. Several possiblilities spring to mind, but it
would probably be considered 'rude' to mention them.

By all means do. Certainly you wouldn't want to miss an opportunity.

Quote:

I wanted to set the "undecorated" property in my
jInternalFrame to TRUE, ..

Stop, ..STOP. Besides hurting my head with the
constant use of the lower case 'j', I read your entire
paragraphs of 'what you want to do' but still do not
understand what you want to offer the end user.

I am the end user.

Quote:
What amazing ability do you wish to offer the end
user? What can this GUI do for them that others
cannot?

See above

Quote:
Assuming the application had a group of floating,
undecorated areas contained within a larger GUI
element. How do I (as potential user) control these
elements?

Ditto

Quote:
How do I close them, or drag them around to
rearrange them? Assuming the areas are opened
and closed by other application logic (buttons, menu
items, the end of a long running process), that really
only leaves positioning. Using a group of JInternalFrame
instances does not makes much sense unless the
user can rearrange the order, or drag them about.

I intended to handle that through code.


Quote:
Assuming only one of the undecorated areas needs to
be viewed at a time, a CardLayout or JTabbedPane that flips
between them, might be better. Otherwise putting the GUI
Elements in a layout where they can all be viewed, such as a
GridLayout in a JScrollPane might be best.

All this might occur within a JFrame or JWindow or JApplet..
as most appropriate, but I cannot understand the use of a
JDesktopPane with undecorated GUI elements floating inside
it.
..
I want ..

Yes yes. 'You want', 'you need'.. tell us what the user
is supposed to get on-screen (on terms of what it looks
like and how it works) and we might be able to assist
further.

Yes, I do want. I am the end user and I am doing it for my own edification
as a learning experience. Feel free to preen and strut about displaying
your obvious superiority, maybe I'll even be able to pick up something
useful buried in all the noise. Possibly you could help me learn java and
in return I'll try to help you become a human being.

Thank You,
Mark



Quote:
--
Andrew Thompson
http://www.athompson.info/andrew/

Message posted via http://www.javakb.com
Back to top
Andrew Thompson
Guest





PostPosted: Mon May 07, 2007 7:11 am    Post subject: Re: A DesktopPane and InternalFrame Discussion... Reply with quote



D.M.Jackson wrote:
...
Quote:
..we might be able to assist further.

Yes, I do want. I am the end user and I am doing it for my own edification
as a learning experience.

Use a layout (as already mentioned). Try the layout
section of the Java Tutorial.

Quote:
..Feel free to preen and strut about displaying
your obvious superiority, maybe I'll even be able to pick up something
useful buried in all the noise. Possibly you could help me learn java and
in return I'll try to help you become a human being.

<dws>
With examples like you to go on, I would not
lower myself. But hey, thanks for the offer.
</dws>

--
Andrew Thompson
http://www.athompson.info/andrew/

Message posted via http://www.javakb.com
Back to top
Andrew Thompson
Guest





PostPosted: Mon May 07, 2007 7:11 am    Post subject: Re: A DesktopPane and InternalFrame Discussion... Reply with quote

D.M.Jackson wrote:
...
Quote:
I observe that I am able to add a jPanel to a jDesktopPane, but not a
jFrame. Why not?

If you actually mean JPanel, JDesktopPane and JFrame
(classes in the J2SE - cannot speak for the ones you
mentioned), then I will add that I am entirely capable of
adding a JPanel (or many) to a JFrame (JDialog,
JOptionPane, JWindow, JApplet etc.).

I cannot immediately explain why you are not able to
do it. Several possiblilities spring to mind, but it
would probably be considered 'rude' to mention them.

Quote:
I wanted to set the "undecorated" property in my
jInternalFrame to TRUE, ..

Stop, ..STOP. Besides hurting my head with the
constant use of the lower case 'j', I read your entire
paragraphs of 'what you want to do' but still do not
understand what you want to offer the end user.

What amazing ability do you wish to offer the end
user? What can this GUI do for them that others
cannot?

Assuming the application had a group of floating,
undecorated areas contained within a larger GUI
element. How do I (as potential user) control these
elements?

How do I close them, or drag them around to
rearrange them? Assuming the areas are opened
and closed by other application logic (buttons, menu
items, the end of a long running process), that really
only leaves positioning. Using a group of JInternalFrame
instances does not makes much sense unless the
user can rearrange the order, or drag them about.

Assuming only one of the undecorated areas needs to
be viewed at a time, a CardLayout or JTabbedPane that flips
between them, might be better. Otherwise putting the GUI
Elements in a layout where they can all be viewed, such as a
GridLayout in a JScrollPane might be best.

All this might occur within a JFrame or JWindow or JApplet..
as most appropriate, but I cannot understand the use of a
JDesktopPane with undecorated GUI elements floating inside
it.
...
Quote:
I want ..

Yes yes. 'You want', 'you need'.. tell us what the user
is supposed to get on-screen (on terms of what it looks
like and how it works) and we might be able to assist
further.

--
Andrew Thompson
http://www.athompson.info/andrew/

Message posted via http://www.javakb.com
Back to top
Ian Wilson
Guest





PostPosted: Mon May 07, 2007 1:37 pm    Post subject: Re: A DesktopPane and InternalFrame Discussion... Reply with quote

D.M.Jackson wrote:
Quote:
"Andrew Thompson" <u32984@uwe> wrote in message news:71ce00fa6858a@uwe...

D.M.Jackson wrote:


If you actually mean JPanel, JDesktopPane and JFrame
(classes in the J2SE - cannot speak for the ones you
mentioned), then I will add that I am entirely capable of
adding a JPanel (or many) to a JFrame (JDialog,
JOptionPane, JWindow, JApplet etc.).


I find that I am unable to add a JFrame to a JDesktopPane and get anything
useful during design time.



As you probably know, there are two popular models of application design
known as Multiple Document Interface (MDI) and Single Document Interface
(SDI). I suspect it is unwise to try to mix them, particularly if your
toolset supports them using separate families of top-level components.
I think of JFrames as useful for SDI and JDesktopPanes + JInternalFrames
as useful for MDI.

http://java.sun.com/docs/books/tutorial/uiswing/components/internalframe.html
Back to top
D.M.Jackson
Guest





PostPosted: Tue May 08, 2007 7:10 am    Post subject: Re: A DesktopPane and InternalFrame Discussion... Reply with quote

Thanks for the advice Ian. I suppose that what I am trying to do doesn't
seem to fit squarely in either design model. I was just wondering. Does it
make sense to use a JPanel inside of a JDesktopPane at times when the
functionality of your app doesn't call for document presentation, but to
provide some other kind of functionality? Or should I never create anything
inside of a JDesktopPane but JInternalFrames? (And use the JInternalFrame to
contain the additional functionality instead of a JPanel?)

It just seems that there are things that I may want to do that would appear
more cluttered and confusing if it were contained inside of a whole other
frame, but on the otherhand, there are times I would just like to be able to
display documents in that area.

Thanks,
Mark


"Ian Wilson" <scobloke2 (AT) infotop (DOT) co.uk> wrote in message
news:463ee540$0$10738$db0fefd9 (AT) news (DOT) zen.co.uk...
Quote:
D.M.Jackson wrote:
"Andrew Thompson" <u32984@uwe> wrote in message news:71ce00fa6858a@uwe...

D.M.Jackson wrote:


If you actually mean JPanel, JDesktopPane and JFrame
(classes in the J2SE - cannot speak for the ones you
mentioned), then I will add that I am entirely capable of
adding a JPanel (or many) to a JFrame (JDialog,
JOptionPane, JWindow, JApplet etc.).


I find that I am unable to add a JFrame to a JDesktopPane and get
anything useful during design time.



As you probably know, there are two popular models of application design
known as Multiple Document Interface (MDI) and Single Document Interface
(SDI). I suspect it is unwise to try to mix them, particularly if your
toolset supports them using separate families of top-level components. I
think of JFrames as useful for SDI and JDesktopPanes + JInternalFrames as
useful for MDI.

http://java.sun.com/docs/books/tutorial/uiswing/components/internalframe.html
Back to top
D.M.Jackson
Guest





PostPosted: Tue May 08, 2007 7:10 am    Post subject: Re: A DesktopPane and InternalFrame Discussion... Reply with quote

I am going back over the layout section of the tutorials as per your
suggestion. I went through them before but I am discovering that
sometimes things aren't as straight forward as they first appear. I've
noticed that certain layouts in combination with certain components do not
produce the results that I expect. I was trying to use a JSplitPane in
combination with a JDesktopPane at first but it gave me troubles. I think I
need to read up a little more on containment hiearchies because depending on
when I added them to the JFrame I seemed to get different behavior. I'll
just keeping messing with it until I get it. Thanks for trying Andrew.

Mark



"Andrew Thompson" <u32984@uwe> wrote in message news:71cecbdf27eba@uwe...
Quote:
D.M.Jackson wrote:
..
..we might be able to assist further.

Yes, I do want. I am the end user and I am doing it for my own
edification
as a learning experience.

Use a layout (as already mentioned). Try the layout
section of the Java Tutorial.

..Feel free to preen and strut about displaying
your obvious superiority, maybe I'll even be able to pick up something
useful buried in all the noise. Possibly you could help me learn java and
in return I'll try to help you become a human being.

dws
With examples like you to go on, I would not
lower myself. But hey, thanks for the offer.
/dws

--
Andrew Thompson
http://www.athompson.info/andrew/

Message posted via http://www.javakb.com
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java GUI Toolkits All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.