public void setGroup(String group) { LOG.fine("changing group.."); usenet.setGroup(group); setMax(usenet.getSize() - 10); setIndex(getMax() - 10); loadTableModel(); }
private void loadTableModel() { messages = usenet.getMessages(getIndex() - getPageSize(), getIndex()); DefaultTableModel dtm = new DefaultTableModel(); dtm.addColumn("subject"); dtm.addColumn("id"); for (Message m : messages) { MessageBean mb = new MessageBean(m); dtm.addRow(mb.getVector()); } setDefaultTableModel(dtm); }
private Messages() { LOG.info("starting controller.."); setMax(usenet.getSize() - 10); setIndex(getMax() - 10); loadTableModel(); }