Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

desktop question

Posted on 2004-10-07
5
Medium Priority
?
261 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 600 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 450 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
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:
Suggested Courses

927 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