Quellcode durchsuchen

this as global variable

dominik.rieder vor 8 Jahren
Ursprung
Commit
e0abfee97b
1 geänderte Dateien mit 2 neuen und 1 gelöschten Zeilen
  1. 2 1
      src/ui/view/StatisticGraphPanel.java

+ 2 - 1
src/ui/view/StatisticGraphPanel.java

@@ -30,6 +30,7 @@ public class StatisticGraphPanel extends JPanel {
 	private final JLabel maximumLabel = new JLabel("0");
 	private JPanel topPanel = new JPanel();
 	private JButton closeButton = new JButton("X");
+	private JPanel that;
 
 	// Variables
 	String graphName;
@@ -68,7 +69,7 @@ public class StatisticGraphPanel extends JPanel {
 		maximumLabel.setPreferredSize(new Dimension(30,10));
 		// ******************** Component Listener ****************//
 		
-		JPanel that = this;
+		that = this;
 		closeButton.addActionListener(new ActionListener() {
 			@Override
 			public void actionPerformed(ActionEvent e) {