This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Hello! Can anybody please help me! I'm creating a JTable. JTable table = new JTable(); Vector rows = new Vector(); Vector columns = new Vector() //specify column names //add a couple of rows table.setDataVector(rows, colums);
Vector v = new Vector(); v.addElement(name); v.addElement(surname); v.addElement(birthdt); v.addElement(email); v.addElement(mobile);
return v; }
This Vector r = new Vector(); r = createClientElement(name, surname, birthdt, email, mobile); rows.add(r); table.addNotify(); works. This int selRow = table.getSelectedRow(); rows.remove(selRow); table.addNotify(); works too. But this Vector r = new Vector(); r = createClientElement(name, surname, birthdt, email, mobile); rows.set(r); // I even tried replacing "set" by removing and then adding an elenment at the same position. table.addNotify(); does not. Only after I click somewhere on the table the element is set. What am I doing wrong? Waiting for reply....... Thank you very much!
It is a mistake to think you can solve any major problems just with potatoes.<br />--Douglas Adams
fedai gandjaliyev
Ranch Hand
Joined: Dec 05, 2005
Posts: 99
posted
0
Doesnt help! Here is the code (on a button click) Vector r = new Vector(); r = createDlvrElement("smth", "smth"); dlvrTabValues.set(0, r); dlvrTable.addNotify(); dlvrTable.validate(); Even removing and then adding at the same position doesnt work. If that worked that would do to me. If I add add or remove before set then it works. But that is not a solution. PLEASE HELP! Thank you