Reputation: 649
I have built an display a TabPanel. At this stage no Chart is displayed .When I click on a button, I build a new chart an add it to the panel. But nothing happens. I have to click on the panel to have the chart displayed at last.
So I put a repaint() on the TabPanel which contains the ChartPanel but with no effect. Am I missing something here ?
if(myChart==null){
myChart = new PortfolioChart(portfolioModel.getDataMatrix());
add(myChart.createPanel(), BorderLayout.CENTER);
repaint();
}else{
myChart.setPortfolio(portfolioModel.getDataMatrix());
myChart.updateDataSet();
}
May be I should put the repaint() instruction on something differrent ?
Upvotes: 1
Views: 233