I haven't done any Java programming for a good long bit, so this is probably
something really silly but anyways, can anyone tell me why my JTextArea is
not appearing when I run this?
public class MyApp extends JFrame {
JTextArea textArea;
public MyApp() {
getContentPane( ).setLayout(nul l);
textArea = new JTextArea();
textArea.setCol umns(300);
textArea.setRow s(10);
textArea.setLoc ation(120, 5);
textArea.setVis ible(true);
getContentPane( ).add(textArea) ;
setDefaultClose Operation(JFram e.EXIT_ON_CLOSE );
setSize(500, 500);
setVisible(true );
}
public static void main(String args[]) {
MyApp win = new MyApp();
}
}
something really silly but anyways, can anyone tell me why my JTextArea is
not appearing when I run this?
public class MyApp extends JFrame {
JTextArea textArea;
public MyApp() {
getContentPane( ).setLayout(nul l);
textArea = new JTextArea();
textArea.setCol umns(300);
textArea.setRow s(10);
textArea.setLoc ation(120, 5);
textArea.setVis ible(true);
getContentPane( ).add(textArea) ;
setDefaultClose Operation(JFram e.EXIT_ON_CLOSE );
setSize(500, 500);
setVisible(true );
}
public static void main(String args[]) {
MyApp win = new MyApp();
}
}
Comment