Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

JList Reselection Question

$
0
0
Ok so I have a Condition Class that creates a condition object. These have an int ID and String Name.

I Also Have a Patient class, these have lots of string and int attributes but also an Array(or list?) of conditions.

on my gui I have a jlist that shows all conditions as you can add more via a method that adds to the conditionsmodel.

My question is how can I get the selected conditions from the jlist, fill them into the patients(already have the id of the patient your on) then add it to the conditions array. The once that is done when I bring up that patient again I want the jlist to auto select what conditions he has.

I have spent hours googling and trying different methods, but it all ends up in me having loops inside loops inside inception or constant errors saying cant have list to array or giving out about casting :S

So far the conditions jlist work, its just reselecting the specfic conditions when the patient is selected!

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>