Solved

desktop question

Posted on 2004-10-07
5
257 Views
Last Modified: 2010-03-31
Hi experts,

before I atempt this I need to ask if it is difficult or will not work for some reason.

I want to place a desktop in the CENTER part of the contentpane and place a panel on the EAST, then have my internal frames on the desktop. Is there any reason this would not work?

also if I later wanted to place an internal frame on the panel so that it would not be affected when I use getAllFrames on the desktop, would that work ok?

any comments,advice,tips are welcome :)

thanks
0
Comment
Question by:Samooramad
  • 3
5 Comments
 
LVL 4

Accepted Solution

by:
gdrnec earned 200 total points
ID: 12252689
No reason for that not to work.

I frequently use a desktop pane on the right side of a splitpane and a navigation tree on the left. Although I use a split pane to organize my panels, there shouldn't be any reason that a BorderLayout wouldn't work as well.

As to the second question about placing an Internal Frame on the panel so it won't be affected by a getAllFrames. If you mean putting an Internal Frame inside the EAST panel, I think this is problematic as Internal Frames are deisgned to be children of the desktop pane?

0
 

Author Comment

by:Samooramad
ID: 12252733
well yes thats what I thought, but I could have sworn I read somewhere that it isn't neccesary to have them on desktops.

well what would you suggest as an alternative? should I declare a second desktop on the east side? my only problem is I can never use getAllFrames because it affects the internal frames in the east part which I want to be independent. or do you have other suggestions?
0
 

Author Comment

by:Samooramad
ID: 12252771
by the way could someone give a line of code on how to place a desktop in the center part of the contentpane?
0
 
LVL 5

Assisted Solution

by:Naeemg
Naeemg earned 150 total points
ID: 12252911
You may use JPanel as main then add BorderLayout with it.
and finally add ur desktop with this panel.
as

mainJPanel.add(myDesktop, BorderLayout.CENTER);


Naeem Shehzad Ghuman
0
 

Author Comment

by:Samooramad
ID: 12252947
ok thank you..will work on it and reply again
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question