javaswingjtreejtreetable

How to present a hierarchical String list with checkboxes in Java Swing?


So. The ideas have been a few.. no good ones.. So here is the problem i have incountered and can not figure out a solution for.

I need to have a txt file containing a hierarchical list of things to do, looking something like this:

The txt file should in the program fill a list shown in a JPanel and after each step have a checkbox to comfirm "I have been a good boy and done this". The list can change over time and grow and shrink, so the solution needs a scrollbar. The list should also contaion a capability to show more the one row.

The solution im working on is done in Jave compiler 1.6 and im using Swing for my layout. Ideas i have had so far are: Modified JTable... and the other solutions i am asshamed of.. And thats about it.. ..


Solution

  • JTree with custom renderer. The renderer should be a panle with checkbox and text area.