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 / February 2005

Tip: Looking for answers? Try searching our database.

Where to find a specific Componenet's clientPropertys?

Thread view: 
bo_kid@yahoo.com - 01 Feb 2005 15:09 GMT
Sometimes when searching for Java help, I get solutions like:
'just set the "ABC" property to "something" and it'll work'.

like for example a property on JTable
addTable.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);

This actually helped me a couple times.

My question is:
Where in the world do I find these properties and what they can be set
to?
Like the "terminateEditOnFocusLost" property for JTable:
Where can I find a document saying that JTable has a
"terminateEditOnFocusLost" property and that this can be set to a
Boolean value?

Is this so simple I've somehow missed it?
Am I the only one who wonders about this?
Very thankfull for any kind of hints are answers!!
Thanks!
/Kid
Thomas Weidenfeller - 01 Feb 2005 15:20 GMT
> My question is:
> Where in the world do I find these properties and what they can be set
> to?

They are to a large extend undocumented. See Q9.7 in the current FAQ
version.

/Thomas

Signature

The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq

John McGrath - 01 Feb 2005 20:21 GMT
> Where in the world do I find these properties and what they can be set
> to?
> Like the "terminateEditOnFocusLost" property for JTable:
> Where can I find a document saying that JTable has a
> "terminateEditOnFocusLost" property and that this can be set to a
> Boolean value?

As Thomas pointed out, they are not documented.  You can find out which
client properties are checked by searching for "getClientProperty" in the
source code.  You will probably also want to look for putClientProperty()
calls on any property you are interested in, since client properties are
sometimes used to record state rather than to set options.

> Is this so simple I've somehow missed it?

These properties are undocumented because they are *not* part of the
public API.  If you write code that depends on them, it very well might
not work with another Java implementation, either from another vendor, or
even the next build of the same minor version from Sun.

Signature

Regards,

John McGrath

bo_kid@yahoo.com - 02 Feb 2005 07:44 GMT
Thanks for the information Thomas and John, and for the link to the
faq!

So one has to search in the source code (currently downloading.
slooooow...) and guess what the properties do!?
If these properties are not part of the public API, what are they for?
Internal use? Testing purpose so they can be incorporated or rejected
later?

>If you write code that depends on them, it very well might
>not work with another Java implementation, either from another
>vendor, or
>even the next build of the same minor version from Sun.
Really bad news, but very good to know!

Thanks again,
/Kid
John McGrath - 02 Feb 2005 09:59 GMT
> So one has to search in the source code (currently downloading.
> slooooow...)

You should already have a full copy of the JDK in the JBuilder /jdk1.4
directory.  The source is in a file called "src.zip".  You might want to
unpack it into the directory /jdk1.4/src.  That will make much it easier
to browse through, and JBuilder will use the unpacked files too.

> and guess what the properties do!?

If you want to use them, yes.  But that should not be too hard in most
cases, given names like "terminateEditOnFocusLost".

> If these properties are not part of the public API, what are they for?
> Internal use? Testing purpose so they can be incorporated or rejected
> later?

I think they are used in both of these cases.  The process for changing
the Java API is not simple, so sometimes changes get added this way, and
they may or may not become permanent.  The "terminateEditOnFocusLost"
property was added with JDK 1.4.1, and it still has not been added to the
API.

Signature

Regards,

John McGrath

bo_kid@yahoo.com - 02 Feb 2005 13:02 GMT
>You should already have a full copy of the JDK in the JBuilder /jdk1.4
>directory.

Thanks, but I'm currently using Eclipse.
Thank you for being helpfull! =)
/Kid
John McGrath - 02 Feb 2005 21:38 GMT
> > You should already have a full copy of the JDK in the JBuilder /jdk1.4
> > directory.
>
> Thanks, but I'm currently using Eclipse.

Ooops!  I spend a lot of time on the Borland newsgroups and I got mixed up
about which group I was on.  Sorry.

Signature

Regards,

John McGrath



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.