Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #1035

Re: Creating JTextArea on

From "Michael Dunn" <michael.dunn@THRWHITE.remove-dii-this>
Subject Re: Creating JTextArea on
Message-ID <1172457889.965119.33820@q2g2000cwa.googlegroups.com> (permalink)
Newsgroups comp.lang.java.gui
References <NipEh.7448$s72.4213@fe12.news.easynews.com>
Date 2011-04-27 15:31 +0000
Organization TDS.net

Show all headers | View raw


  To: comp.lang.java.gui
On Feb 26, 10:52 am, "TonyB" <t...@kerrisway.freeserve.co.uk> 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));

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

Back to comp.lang.java.gui | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Creating JTextArea on mai "TonyB" <tonyb@THRWHITE.remove-dii-this> - 2011-04-27 15:31 +0000
  Re: Creating JTextArea on gethostbyname@gmail.com.remove-dii-this - 2011-04-27 15:31 +0000
    Re: Creating JTextArea on gethostbyname@gmail.com.remove-dii-this - 2011-04-27 15:31 +0000
      Re: Creating JTextArea on "TonyB" <tonyb@THRWHITE.remove-dii-this> - 2011-04-27 15:31 +0000
  Re: Creating JTextArea on "Michael Dunn" <michael.dunn@THRWHITE.remove-dii-this> - 2011-04-27 15:31 +0000
  Re: Creating JTextArea on gethostbyname@gmail.com.remove-dii-this - 2011-04-27 15:31 +0000

csiph-web