Re: Creating JTextArea on main window of app ?
- From: "Michael Dunn" <m_odunn@xxxxxxxxx>
- Date: 25 Feb 2007 18:44:50 -0800
On Feb 26, 10:52 am, "TonyB" <t...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
I'm trying out a simple gui. I'm trying to create an text area to allow me
to display some text from inside the app if a menu item is clicked. I think
JTextArea will do the job, but I'm having problems making it appear.
The code to add to my container is
Container contentPane = frame.getContentPane();
JTextArea itemArea = new JTextArea();
contentPane.add(itemArea);
is the contentPane the main area of the window ?
Tony
try giving the textArea some size
JTextArea itemArea = new JTextArea(10,10);
now add it to a scrollPane
contentPane.add(new JScrollPane(itemArea));
.
- References:
- Creating JTextArea on main window of app ?
- From: TonyB
- Creating JTextArea on main window of app ?
- Prev by Date: Creating JTextArea on main window of app ?
- Next by Date: Re: Creating JTextArea on main window of app ?
- Previous by thread: Creating JTextArea on main window of app ?
- Next by thread: Re: Creating JTextArea on main window of app ?
- Index(es):
Relevant Pages
|