Solved

desktop question

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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

746 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

10 Experts available now in Live!

Get 1:1 Help Now