if (o instanceof VisualizationViewer) {
vv = (VisualizationViewer)o;
final Point2D p = vv.inverseTransform(e.getPoint());
String text = JOptionPane.showInputDialog(vv, "Please provide the text", "Label's value", JOptionPane.QUESTION_MESSAGE);
if (text != null && text.length() > 0) {
NexsmPaintableText npt = new NexsmPaintableText();
npt.setText(text);
npt.setP1(p);
npt.setColor(Color.BLACK);
if (gm != null) {
gm.putRenderer(vv.getName(), npt);
}
}
}