Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to use ListSelectionListener in 3 table with database
    primarykey
    data
    text
    <p>I wanna ask problem about list selection listener. In my application, I have 3 Jtable, lets say the first table is Student table, filled by student information, the second is semester table, filled by some semesters to the correspondent student (semester 1 to x), and the last table is result table, filled by result on the correspondent semester.</p> <p>What i want to do is when I click a row in student table, semester table will update it's data, for example, it will filled by semester 1 to 6. Then, when i click a row in semester table, the result table will update it's data.</p> <p>I can do it from student table to semester table with listselectionlistener and overriding valueChanged method. But how should i do for the same for semester table to result table? I'm getting stuck on this...</p> <ul> <li>i use database to retrieve all values to jtable -</li> </ul> <p>edited : now I used SwingWorker, but i have another problem :</p> <ol> <li>When the UI is showing, the master table display a row (this is true)</li> <li>When i try to clicked that row, it dont clicked, i mean usually u will get a background in a selected row, but not with me (wrong->my problem)</li> <li>It also throw NullPointerException at my child table</li> <li>But when i wait for a while, it suddenly work again...</li> </ol> <p>i've uploaded my sample code, and remove unrelated code here <a href="http://dl.dropbox.com/u/67181952/mycode.java" rel="nofollow">http://dl.dropbox.com/u/67181952/mycode.java</a></p> <p>2nd code for error in child table <a href="http://dl.dropbox.com/u/67181952/spk.java" rel="nofollow">http://dl.dropbox.com/u/67181952/spk.java</a></p> <p>I hope i explained well, sorry for my bad english.</p> <p>Thanks for any help :)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload