wieso führt mein compiler folgendes nicht aus:
Error-Meldung:
Exception in thread "main" java.lang.Error: Unaufgelöstes Kompilierungsproblem:
at MyJTextArea.main(MyTextArea.java:22)
was ist da los?!
danke für eure Hilfe!
mfg
Code:
import javax.swing.*;
public class MyJTextArea extends JFrame{
JTextArea textarea;
public MyJTextArea(){
super("JTextArea");
JTextArea textarea = new JTextArea(4, 15);
textarea.setLineWrap(true);
textarea.setWrapStyleWord(true);
textarea.setTabSize(5);
textarea.setText("TEST");
JPanel panel = new JPanel();
panel.add(textarea);
setContentPane(panel);
}
public static void main(String[]args){
MyJTextArea mta = new MyJTextArea();
mta.setSize(180,100);
mta.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
mta.setVisible(true);
}
}
Error-Meldung:
Exception in thread "main" java.lang.Error: Unaufgelöstes Kompilierungsproblem:
at MyJTextArea.main(MyTextArea.java:22)
was ist da los?!
danke für eure Hilfe!
mfg