Swing Chapter 18. (Advanced topics) Tables. Easy for reading, Click here!

Swing Chapter 18. (Advanced topics) Tables. Easy for reading, Click here!

18.2 Stocks Table: part I – Basic JTable example

This basic example shows how to construct a JTable to display information about stock market data for a given day. Despite of its simplicity, it demonstrates the most fundamental features of JTable, and serves as a good basis for the more advanced examples that follow.

Beans Binding Via The Road Less Travelled By (Part 2)

Beans Binding Via The Road Less Travelled By (Part 2)

Beans Binding Via The Road Less Travelled By (Part 2)

A continuation from yesterday—this time, instead of a JTable and a JTextField, we’ll look at a JList and a JTextField. I realized yesterday, after writing that blog entry, that it was pretty dumb to set the JTextFields as not editable while the update strategy was READ_WRITE. Had I made the JTextFields editable, I would have been able to update the currently selected row in the table, from the related JTextFields. So this time I won’t make that mistake. As yesterday, we will not use any tool at all. Just a plain editor.

When we finish this blog entry, we will have a small JFrame that looks like this:

All those confusing persistence methods

Hibernate articles | Persisting methods

All those confusing persistence methods
When you want to write your object to the database, the Hibernate Session has a confusing abundance of methods to choose from.

* save()
* persist()
* update()
* saveOrUpdate()
* merge()

In this article, I try to make sense of them.

Perhaps the most common misconception about these methods, is that save() always generates an SQL INSERT statement in the database, and update() always generates an SQL UPDATE in the database.
This is not, true; but, unfortunately, the documentation provided by the Hibernate does nothing to clarify it.

Openswing

OpenSwing Framework

Introduction to Openswing

OpenSwing is an open-source suite of advanced graphics components based on Swing toolkit: these components are more sophisticated of those provided with Swing and can be manipolated directly inside the UI designer of the IDE.
It is also a framework that provides data binding mechanism between components and data model, based on the MVC paradigm. Data model is based on Java Beans (POJOs) and it is supported in all OpenSwing components, such as grid control, tree control or generic controls container.

跟資料庫的結合看起來不錯, 可用在desktop application上