which Java component to use to display query result

Hi, I need to display all customers and their orders in one DB Grid, which means that there will be the quuery like foll.: SELECT C.NAME, O.NUMBER, O.DATE FROM CUSTOMERS C, ORDERS O
WHERE C.ID_CUSTOMER = O.ID_CUSTOMER
ORDER BY C.NAME.
The question is which Java component shell I use to display the query result in one DB Grid like it can be easily done in Delphi or Access? I tried to use JTable but it seems to be not possible with this component.
Thanks in advance for your support.
annisoulAsked:
Who is Participating?
 
zzynxSoftware engineerCommented:
You could use a so called tree table.
Each (main) row then contains a customer. And when you expand the customer row it contains (sub rows containing) all orders for that customer.

http://java.sun.com/products/jfc/tsc/articles/treetable1/
http://java.sun.com/products/jfc/tsc/articles/treetable2/index.html

As you can read over there:
The Swing package does not contain a JTreeTable component, but it is fairly easy to create one by installing a JTree as a renderer for the cells in a JTable.
0
 
DhaestCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.