Solved

desktop question

Posted on 2004-10-07
5
254 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
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 learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

895 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now