-
Dynamic Rows in JTable
Ok, I'm trying to do something in a JTable and I'm not sure how to do it. I am writing an app to display some fuel tank level information for some convience stores. I can list the stores and the tank information in the JTable just fine. It looks like this:
Store Tank Fuel Type
123 1 No Lead
123 2 Premium
123 4 Diesel
456 1 No Lead
456 2 Premium
456 4 Diesel
But, what I would like instead is:
Store
123
456
And, if you click on a store number, like '123' it would then display:
Store
123
->Tank 1 No Lead
->Tank 2 Premium
->Tank 4 Diesel
456
And, if I was to click on 123 again, it would roll back up to how it looked before:
Store
123
456
Now, I know how to do this in HTML with CSS. It's pretty easy. But, since this is a regular app, I'm not sure how to do it.
Maybe, I need to not make the whole thing a JTable, and just a JList with the store numbers. Then, when you click on a store number, it would display a JTable with the tank info. That would work, but I don't know if I could make the formatting look good.
Any help or suggestions would be great. Thanks.
Similar Threads
-
By freesoft_2000 in forum Java
Replies: 3
Last Post: 11-25-2006, 05:53 AM
-
By jainsoni in forum Java
Replies: 1
Last Post: 04-27-2006, 07:11 AM
-
Replies: 2
Last Post: 06-08-2005, 08:42 AM
-
Replies: 1
Last Post: 05-04-2001, 11:28 AM
-
By Fabio Luis De Paoli in forum Java
Replies: 1
Last Post: 12-16-2000, 11:00 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|