diagram ImageIO read new File diagramName labelForDiagram new JLabel n

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
diagram = ImageIO.read(new File(diagramName));
labelForDiagram = new JLabel(new ImageIcon(diagram));
panelForDiagram.removeAll();
scrollPaneForDiagram.removeAll();
scrollPaneForDiagram = new JScrollPane(labelForDiagram);
panelForDiagram.add(scrollPaneForDiagram);
tabs.removeTabAt(1);
tabs.addTab("Diagram", scrollPaneForDiagram);