4

I need a table that displays properties and allows their values to be changed. Similar to the Netbeans properties windows for the GUI editor. Does anyone know of any existing classes or libraries. I'd hate to reinvent the wheel on this one.

Edit:

Something like this which allows separators into different groups, JCombos, and JButtons to all be used.

Thanks

user489041
  • 27,916
  • 55
  • 135
  • 204

7 Answers7

1

I would recommend JTable, and a gridbag layout manager.

Evan
  • 279
  • 1
  • 2
  • 11
1

The table in NetBeans is PropertySheetView (or similar) and it is part of the NetBeans Platform (PropertySheetView JavaDoc). This class should also be usable in a standalone Swing application by including the necessary NetBeans modules as jar files in the classpath (Found this with a bit of googling).

tPeltola
  • 21
  • 2
0

JTable can be used to display a Grid with values and allow the user to edit the value from columns you enable to it.

Marcos Vasconcelos
  • 18,136
  • 30
  • 106
  • 167
0

You could leverage the JTable class; which should provide the base you need.

Aaron McIver
  • 24,527
  • 5
  • 59
  • 88
  • I thought about that, but I was hoping something already existed that could handle separators, buttons, and all that like the picture above. – user489041 Mar 15 '11 at 18:21
  • You can swap out the cell renderer/editor for a given type, place a combo box in a given cell, etc... http://kickyourbrain.blogspot.com/2008/03/custom-cell-editors-and-renderers-in.html – Aaron McIver Mar 15 '11 at 18:24
0

JIDE Soft has a number of components, some of them are OpenSource take a look at there to see if you fine the one you need.

OscarRyz
  • 196,001
  • 113
  • 385
  • 569
  • The JIDE Grids PropertyPane is exactly what I need. However, I only need the one component and cant justify 300 dollars for that. – user489041 Mar 15 '11 at 18:33
0

For future reference

I'm successfully using l2prof-common's PropertySheetPanel. The documentation is not that great and the API is not that clean, but it works, and the view is nice

The official site is http://www.l2fprod.com/common/

But the download link is broken; I compiled the propertysheet JAR myself but you can get the whole library from http://www.astrogrid.org/maven/l2fprod/jars/

The library doubles as a demo if you execute the jar and there's also the code in it

I found this other question useful Have com.l2fprod.common.propertysheet.PropertySheetPanel To Display Composited Class

Community
  • 1
  • 1
Hilikus
  • 9,954
  • 14
  • 65
  • 118
0

I would recommend taking a look at the SwingX JXTreeTable. I have used it in an application to create a very similar view.

An example screenshot I found on the web (here) to illustrate this

JXTreeTable screenshot

Robin
  • 36,233
  • 5
  • 47
  • 99