Pregunta

Could you please suggest database grid component that allows to save or load column layout (things like sequence, names, width) to/from files.

I am also interested in an approach that would allow to implement this functionality using standard library.

¿Fue útil?

Solución

The Delphi ecosystem is a bit different from Java. First, Delphi is pretty much an integrated tool so the components out there are wide-ranging and very data-centric. Java is a much larger ecosystem and it is far more focused on data-structures which you can read and write to from the GUI.

That being said, yes, there are a lot of grids out there. In Java it is a JTable in Swing and a TableView in JavaFX2 (arguably the new Swing). Swing is mature and has a horde of tables available for it, but in my experience it is easier to just write a custom JTable and work from there. The Java tutorials will get you up and running.

The long and short here is you don't need a component that is provided, but you can build one yourself (probably in less than a couple hours if you're proficient), probably a couple days making mistakes if you're not.

If you really are looking for an "out of the box" solution that feels more like Delphi then I recommend: http://www.jidesoft.com/products/grids.htm

Honestly getting a JTable up and rolling and building a TableModel is a very simple task. I'd recommend doing it as you're going to need to think differently in Swing. If you're willing to try something with less support JavaFX 2 is definitely more flexible. As to your comment about column orders etc... all of these approaches support doing that. In swing you can look at the TableColumnModel.

Otros consejos

I can also check Open Swing Framework

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top