Roman Kagan
Roman Kagan

Reputation: 10626

JavaFX component that emulates JTable

I have a large dataset that needs to be displayed for users and looking for Swing's JTable like component in JavaFX.

Upvotes: 4

Views: 7581

Answers (3)

jewelsea
jewelsea

Reputation: 159586

Use a TableView control.

A TableView is a "virtualized" control which efficiently reuses a small number of node cells to present a view into potentially very large data sets.

table view sample

Note, other answers on this page which were written before 2012 concern JavaFX 1.x and are obsolete.

Upvotes: 2

Matthew Hegarty
Matthew Hegarty

Reputation: 4306

I recommend you read Amy Fowler's recent blog post (especially point 6):

Any Swing component can be embedded in a JavaFX scene graph using the SwingComponent wrap() function. This conveniently allows you to directly leverage those Swing components which you've already configured, customized, and hooked to your application data; all that Java code can remain happily unmodified. Once you've created the structure of your scene's layout, you can pull your Swing components into the appropriate locations.

http://weblogs.java.net/blog/aim/archive/2009/06/insiders_guide.html

Upvotes: 4

Eugene Ryzhikov
Eugene Ryzhikov

Reputation: 17369

You can wrap JTable to be used in JavaFX. Check out the following article http://java.dzone.com/articles/javafx-reintroduce-swing-jtabl

Upvotes: 1

Related Questions