5556575859606162636465
p.setBorder(new LineBorder(Color.darkGray, 1, true)); p.addMouseListener(new MouseAdapter(){ public void mouseClicked(MouseEvent e) { p.getNanoGraph().setLayout(new ForceDirectedLayoutAlgorithm(p)); } } ); p.setModel(g);