Results 1 to 6 of 6
  1. #1
    aizen92 is offline Senior Member
    Join Date
    Nov 2010
    Posts
    155
    Rep Power
    4

    Default text areas expanding

    Hello,

    I am trying to make a simple pad, everything is okay, but i still have one problem which is when i expand the window of the pad with the mouse, the text area is still same size, how can i make it expandable?

    Regards,

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,189
    Rep Power
    19

    Default

    Your question as asked is well nigh unanswerable. Recommended reading: How to ask questions the smart way

    db

  3. #3
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default

    Probably you need to use the right layout manager that allows the text area to expand with the GUI such as a Borderlayout. If this doesn't answer your question, then please clarify the question greatly. Darryl's like will tell you just what we need to know to answer you.

  4. #4
    aizen92 is offline Senior Member
    Join Date
    Nov 2010
    Posts
    155
    Rep Power
    4

    Default

    Its like when maximizing the window, the text area which is set at the center of the borderlayout, should exapnd accordingly with the size of the window, but mine is not, how can i make it

    for more clarification here r some pics:


    as u can see the text area is still small
    Last edited by aizen92; 03-20-2011 at 08:35 PM.

  5. #5
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default

    Then there are other layouts involved that you (and by extension -- us) are not aware of. Quite possibly your JTextArea has been placed in a container that uses BorderLayout in the BorderLayout.CENTER position, but then that container might be placed in another container that uses FlowLayout or GroupLayout. Since you have the code, you're going to have to do a little detective work.

    Luck

  6. #6
    aizen92 is offline Senior Member
    Join Date
    Nov 2010
    Posts
    155
    Rep Power
    4

    Default

    I see
    Well thx for the help
    Ill see what i can do in mycode to fix it

    EDIT:

    It worked, i just made the layout of the panel that holds the text area to borderlayout, and added the text area object to center and worked
    Last edited by aizen92; 03-20-2011 at 09:18 PM.

Similar Threads

  1. JFrame expanding to fit content
    By pcman312 in forum AWT / Swing
    Replies: 1
    Last Post: 12-31-2010, 07:09 PM
  2. Triangle Areas - Please help before I smash my laptop into pieces!
    By Atia of the julii in forum New To Java
    Replies: 67
    Last Post: 11-10-2010, 05:40 PM
  3. AWT: Painting buttons and text areas in a canvas
    By chappa in forum AWT / Swing
    Replies: 6
    Last Post: 01-09-2010, 02:37 PM
  4. dynamically expanding byte container?
    By dfens in forum New To Java
    Replies: 1
    Last Post: 07-03-2009, 10:27 AM
  5. text areas, printstream, and "\n"
    By diggitydoggz in forum New To Java
    Replies: 10
    Last Post: 12-26-2008, 04:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •