Пример #1
0
  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());
    }
  }
Пример #2
0
 @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());
   }
 }