M 
		
				
			
		Martin222
Gast
Hallo, 
ich habe folgendes Problem:
	
	
	
	
	
		
	
Wenn ich das so machen will, sagt eclipse mir an der Stelle x:
cannot refer to a non-final variable status/text inside an inner class defined in a different method.
die variablen status und text werden in der main-Methode angelegt, aber auch wenn ich sie als Klassenvariablen anlege, kommt diese Fehlermeldung.
can you help me, please?
Gruß, Martin[/code]
			
			ich habe folgendes Problem:
		Code:
	
	public void paintElements(JFrame f, Status status, ResourceBundle text) {
...
JButton button = new JButton("Create New");
		button.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				
	X			openCreateWindow(status, text);
				// irgendwie das hier an button binden:
				// openCreateWindow(status, text);
			}
			
		});
...
}Wenn ich das so machen will, sagt eclipse mir an der Stelle x:
cannot refer to a non-final variable status/text inside an inner class defined in a different method.
die variablen status und text werden in der main-Methode angelegt, aber auch wenn ich sie als Klassenvariablen anlege, kommt diese Fehlermeldung.
can you help me, please?
Gruß, Martin[/code]
 
				 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		