private void fill(Vector<TaEntry> v) { Enumeration<TaEntry> e = v.elements(); modelPartition = new DefaultTableModel(); modelPartition.addColumn("Unit"); tablePartition.setModel(modelPartition); while (e.hasMoreElements()) { TaEntry ta = e.nextElement(); content.put(ta.getPartition(), ta); modelPartition.addRow(new String[] {ta.getPartition()}); } tablePartition.setRowSelectionInterval(0, 0); reloadUnit(); }
private void reloadUnit() { String result = (String) modelPartition.getValueAt(tablePartition.getSelectedRow(), 0); if (ta != null) ta.setData(hex.getByteContent()); ta = (TaEntry) content.get(result); hex.setByteContent(ta.getDataString().getBytes()); }