Re: Creating JTextArea on main window of app ?
- From: "TonyB" <tonyb@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 26 Feb 2007 10:07:56 GMT
<gethostbyname@xxxxxxxxx> wrote in message
news:1172460407.485560.119190@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On 25 fev, 23:56, "gethostbyn...@xxxxxxxxx" <gethostbyn...@xxxxxxxxx>Hi
wrote:
Look a simple working source code:
-------------------------------------------------------------
package javaapplication3;
import javax.swing.JFrame;
import javax.swing.JTextArea;
public class Main extends JFrame {
private JTextArea textArea;
public Main() {
super("PH");
setSize(500,500);
setVisible(true);
textArea = new JTextArea();
getContentPane().add(textArea);
Forgive me. Put
setVisible(true);
after the
getContentPane().add(textArea);
Maybe, this is your source code problem too.
}
public static void main(String[] args) {
Main application = new Main();
application.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
}
-------------------------------------------------------------
gethostbyname
Thanks for the help.That item working now. Onto next problem
Tony
.
- References:
- Creating JTextArea on main window of app ?
- From: TonyB
- Re: Creating JTextArea on main window of app ?
- From: gethostbyname@xxxxxxxxx
- Re: Creating JTextArea on main window of app ?
- From: gethostbyname@xxxxxxxxx
- Creating JTextArea on main window of app ?
- Prev by Date: Re: move four balls in four differnt directions
- Next by Date: Re: TrayIcon with PopupMenu or JPopupMenu ?
- Previous by thread: Re: Creating JTextArea on main window of app ?
- Next by thread: Re: Creating JTextArea on main window of app ?
- Index(es):