} else if (butt.getText().equals(chartText)) {
Method m = this.allButtonsChart.get(butt);
m.setAccessible(true);
Object[] pars = this.getParametersFor(m);
GeneralDialog dia1 = new GeneralDialog(
this,
null,
"The name of the chart to add the series",
GeneralDialog.OK_BUTT,
"Chart name",
1,
20,
true);
dia1.setVisible(true);
String chartName = dia1.getText();
GeneralDialog dia2 = new GeneralDialog(
this,
null,
"The name of the series",
GeneralDialog.OK_BUTT,
m.getName() + "-agent-" + invokerAgent.id(),
1,
20,
true);
dia2.setVisible(true);
String seriesName = dia2.getText();
ChartEvent event = new ChartEvent(chartName, seriesName, 0);
events.put(event, pars);
chartMethods.put(event, m);
chartAgents.put(event, invokerAgent);