tags:

views:

71

answers:

1

I have a java program that will work with a variety of Java Beans. I'm interested in displaying a "property sheet" that will show the fields and methods for the bean from BeanInfo and/or reflection. It could also update the information from the bean.

Is there a built-in way of creating these property sheets? I was thinking something that would look like this: http://www.time-tripper.com/uipatterns/Property_Sheet. Is this a good way to go about designing a simple beans application or does someone have a better alternative maybe with annotations?

Thanks!

+3  A: 

That is exactly what most GUI designers (e.g. NetBeans' Matisse) will have for displaying the properties of Swing Beans. As NetBeans is open source, you can probably get what you're looking for there

oxbow_lakes
Interesting idea. I found the class http://bits.netbeans.org/dev/javadoc/org-openide-explorer/org/openide/explorer/propertysheet/PropertySheet.html. But, I get a "NetBeans implementation of Preferences not found" exception when implemented as they suggested. I could probably get it working, but it's a bit heavier than what I need. Plus, I don't think the client will like having a GPL library in the project.
User1
When you say "Property Sheet" - do you mean a web-page? Something that appears in the JConsole? A Swing panel? Is "Property Sheet" terminology from another language (c# perhaps?) - it's not immediately obvious what you want; after all, iterating thru a `BeanInfo` is hardly complicated...
oxbow_lakes
I added a URL to the question. It is more of a Microsoft thing, but as shown above NetBeans has it too. It's basically just a JTable with a Name/Value tuple. There's also a button that when pressed, a related widget is displayed to edit the value (eg DateChooser for values of type Date). Thanks for you insights so far.
User1
I see - yes; Java IDEs have had the same thing for 10 years but always for UI elements. They are called *customizers*
oxbow_lakes
I found some data about Customizer: http://java.sun.com/j2se/1.5.0/docs/api/java/beans/Customizer.html. Do you have a good tutorial?
User1
I'm afraid I do not - it's been almost 10 years since I used them!
oxbow_lakes
I'll vote up anyone who has a good tutorial or good modern-day alternative.
User1