I have my code below, I am trying to receive m_rows which is an array. It looks like it stays empty and my frame stays blank. I can see the class has received the event. I think my class Table works ok. Do you see anything obviously wrong in the code below between the receipt of m_rows from the listener and passing it to TableModel(m_rows)?
Thanks
class Frame extends JFrame implements FlowListener {
private List<Candle> m_rows = new ArrayList<Candle>();
public Frame() {
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setTitle("Ma premiere fenetre");
setBounds(50, 100, 1000, 800);
Container conteneur = new JPanel();
TableModel tableModel = new TableModel(m_rows);
JTable table = new JTable(tableModel);
JPanel tablePanel = new JPanel();
tablePanel.add(table);
conteneur.setLayout(new GridLayout(2, 1));
conteneur.add(tablePanel);
this.add(conteneur);
this.setVisible(true);
}
@Override
public void updateOnFlow(List<Candle> newFlow) {
m_rows = newFlow;
this.repaint();
}
}