Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / January 2004

Tip: Looking for answers? Try searching our database.

Retrieve component from JPanel..

Thread view: 
Robert Karlsson - 30 Jan 2004 06:40 GMT
I wonder whether it is possible to retrieve
a Component from a JPanel (which has a BorderLayout)
and know where it is situated (NORTH, SOUTH, EAST, ..).

I have searched the docs without results. What I
would like is something similar to the getChild
method in BorderLayout, however it is declared
private so I can not use it.

Any help is much appreciated.

 Cheers,
  Rob
ak - 30 Jan 2004 09:04 GMT
> I wonder whether it is possible to retrieve
> a Component from a JPanel (which has a BorderLayout)
[quoted text clipped - 4 lines]
> method in BorderLayout, however it is declared
> private so I can not use it.

you could override method addImpl() of your JPanel and save component and
appropriate constraint in a Hashtable.

____________

http://reader.imagero.com the best java image reader.
Flo - 31 Jan 2004 02:03 GMT
> > I wonder whether it is possible to retrieve
> > a Component from a JPanel (which has a BorderLayout)
[quoted text clipped - 9 lines]
>
> ____________

Ah...I did not know that. I was also thinking about changing the weight of
gridlines between the specific columns, but after reading your comment, I do
suspect that there will be a similar problem in that only all gridlines
together can be changed. Inserting an empty column and setting its width
very small (i.e. double grid lines) will divide the columns up visually. I
will go for that. Thanks ak.

Flo
Flo - 31 Jan 2004 02:11 GMT
Sorry Robert,

I accidentally posted to the wrong thread. My reply was meant for something
ak replied to earlier. Please ignore my post in this thread.

Flo
Robert Karlsson - 31 Jan 2004 13:03 GMT
>>I wonder whether it is possible to retrieve
>>a Component from a JPanel (which has a BorderLayout)
[quoted text clipped - 7 lines]
> you could override method addImpl() of your JPanel and save component and
> appropriate constraint in a Hashtable.

Thank you for the reply ak, this was
exactly what I needed.

 diod.se | Robert Karlsson


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.