Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #1586 > unrolled thread

A DesktopPane and Interna

Started by"D.M.Jackson" <d.m.jackson@THRWHITE.remove-dii-this>
First post2011-04-27 15:34 +0000
Last post2011-04-27 15:34 +0000
Articles 7 — 3 participants

Back to article view | Back to comp.lang.java.gui


Contents

  A DesktopPane and Interna "D.M.Jackson" <d.m.jackson@THRWHITE.remove-dii-this> - 2011-04-27 15:34 +0000
    Re: A DesktopPane and Int "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:34 +0000
      Re: A DesktopPane and Int "D.M.Jackson" <d.m.jackson@THRWHITE.remove-dii-this> - 2011-04-27 15:34 +0000
        Re: A DesktopPane and Int "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:34 +0000
          Re: A DesktopPane and Int "D.M.Jackson" <d.m.jackson@THRWHITE.remove-dii-this> - 2011-04-27 15:34 +0000
        Re: A DesktopPane and Int "Ian Wilson" <ian.wilson@THRWHITE.remove-dii-this> - 2011-04-27 15:34 +0000
          Re: A DesktopPane and Int "D.M.Jackson" <d.m.jackson@THRWHITE.remove-dii-this> - 2011-04-27 15:34 +0000

#1586 — A DesktopPane and Interna

From"D.M.Jackson" <d.m.jackson@THRWHITE.remove-dii-this>
Date2011-04-27 15:34 +0000
SubjectA DesktopPane and Interna
Message-ID<133t7sk8rk7h6ff@corp.supernews.com>
  To: comp.lang.java.gui
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

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [next] | [standalone]


#1587 — Re: A DesktopPane and Int

From"Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this>
Date2011-04-27 15:34 +0000
SubjectRe: A DesktopPane and Int
Message-ID<71ce00fa6858a@uwe>
In reply to#1586
  To: comp.lang.java.gui
D.M.Jackson wrote:
..
>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.

>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.
..
>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

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#1588 — Re: A DesktopPane and Int

From"D.M.Jackson" <d.m.jackson@THRWHITE.remove-dii-this>
Date2011-04-27 15:34 +0000
SubjectRe: A DesktopPane and Int
Message-ID<133tfo757kd52dc@corp.supernews.com>
In reply to#1587
  To: comp.lang.java.gui

"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.



> > 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.

>
>>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.

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

See above

> 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

> 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.


> 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



> -- 
> Andrew Thompson
> http://www.athompson.info/andrew/
>
> Message posted via http://www.javakb.com
>

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#1589 — Re: A DesktopPane and Int

From"Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this>
Date2011-04-27 15:34 +0000
SubjectRe: A DesktopPane and Int
Message-ID<71cecbdf27eba@uwe>
In reply to#1588
  To: comp.lang.java.gui
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

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#1601 — Re: A DesktopPane and Int

From"D.M.Jackson" <d.m.jackson@THRWHITE.remove-dii-this>
Date2011-04-27 15:34 +0000
SubjectRe: A DesktopPane and Int
Message-ID<133vr0p82dh7mca@corp.supernews.com>
In reply to#1589
  To: comp.lang.java.gui
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...
> 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
>

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#1591 — Re: A DesktopPane and Int

From"Ian Wilson" <ian.wilson@THRWHITE.remove-dii-this>
Date2011-04-27 15:34 +0000
SubjectRe: A DesktopPane and Int
Message-ID<463ee540$0$10738$db0fefd9@news.zen.co.uk>
In reply to#1588
  To: comp.lang.java.gui
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

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#1602 — Re: A DesktopPane and Int

From"D.M.Jackson" <d.m.jackson@THRWHITE.remove-dii-this>
Date2011-04-27 15:34 +0000
SubjectRe: A DesktopPane and Int
Message-ID<133vrtqhqbo3u62@corp.supernews.com>
In reply to#1591
  To: comp.lang.java.gui
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@infotop.co.uk> wrote in message 
news:463ee540$0$10738$db0fefd9@news.zen.co.uk...
> 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

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.gui


csiph-web