I have a problem using JGraphT to visualize graphs. I use netBeans and I have imported .jar for JGraph and JGraphT and copied everything from JGraphT Visualizations via JGraph and added this code:
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
JApplet applet = new JApplet();
applet.init();
JFrame frame = new JFrame();
frame.getContentPane().add(applet);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setVisible(true);
}
but I still get no graph visualization. What should I do to get the graph visualized on a form?