JavaFX – Database + Table


Bookmark and Share

  Please refer to another post for virtualized scalable implementation of TableView for JavaFX 1.3

JavaFX + Apache Derby Database + JDBC – I have seen several queries related to this, hence thought of providing a sample application. In order to avoid any back-end database setup, I’m using Embedded Derby which will create database in <UserHome>/JavaFXDatabase/. The Derby jars are hosted as separate JNLP extension – ApacheDerby.jnlp – which is referenced in application jnlp files.

Click “Populate” button to add some dummy data to the Table.


To launch click on above image or

Note: Application may take a little longer to download due to large size of Derby jar files. Application will show two certificate dialogs – One for application and another for Derby Extension. These permissions are required so as to create database in user’s home directory.

Database access code is same as any other java application – DBUtils.java. The table is implemented using Rectangle, Label and Panel Layout. Its not really scalable as its not using any virtual concepts, all nodes are real. The approach can be used for simple applications. Please refer to CustomerTable.fx for more information.

Try it out and let me know feedback..

Please also refer to article – JavaFX Database Programming with Java DB for step by step approach..

Advertisements

About Rakesh Menon
-

5 Responses to JavaFX – Database + Table

  1. Hello Sir Menon!
    I always read your blog! I liked this application.
    In Brazil, people always ask for applications that use database. Can I post this in portuguese, explaining some parts of the code???
    Thanks for this!
    Merry Christmas and Happy New Year

  2. Rakesh Menon says:

    @William Antônio Sure! Please feel free to enhance/translate/share.. If possible provide a link here..

  3. Ah .. most awaiting post :). thanks !

  4. ripunjay says:

    hello sir,
    i hav created database in sqlite and done front end programming in javafx..
    plz tell me how can i connect these two..
    i means how can i populate my database (in sqlite) from application program(in javafx).
    thank you sir.

  5. ripunjay says:

    i m using netbeans6.9 beta IDE…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: