private void getNewDataModel() { if (listModel.size() != 0) listModel.removeAllElements(); if (rssFeed != null) { for (Data row = rssFeed.resetCursor(); row != null; row = rssFeed.next()) listModel.addElement(row.getTitle()); } }
@Override public void valueChanged(ListSelectionEvent e) { if (e.getSource() == listData && listData.getSelectedValue() != null) { Data tmp = rssFeed.searchByTitle((String) listData.getSelectedValue()); if (tmp != null) this.desc.setText(tmp.getDesc()); } }