浏览代码

this as global variable

dominik.rieder 8 年之前
父节点
当前提交
e0abfee97b
共有 1 个文件被更改,包括 2 次插入1 次删除
  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 final JLabel maximumLabel = new JLabel("0");
 	private JPanel topPanel = new JPanel();
 	private JPanel topPanel = new JPanel();
 	private JButton closeButton = new JButton("X");
 	private JButton closeButton = new JButton("X");
+	private JPanel that;
 
 
 	// Variables
 	// Variables
 	String graphName;
 	String graphName;
@@ -68,7 +69,7 @@ public class StatisticGraphPanel extends JPanel {
 		maximumLabel.setPreferredSize(new Dimension(30,10));
 		maximumLabel.setPreferredSize(new Dimension(30,10));
 		// ******************** Component Listener ****************//
 		// ******************** Component Listener ****************//
 		
 		
-		JPanel that = this;
+		that = this;
 		closeButton.addActionListener(new ActionListener() {
 		closeButton.addActionListener(new ActionListener() {
 			@Override
 			@Override
 			public void actionPerformed(ActionEvent e) {
 			public void actionPerformed(ActionEvent e) {