TextArea expands on own?

From: Merlin_1102 (merlin_1102_at_hotmail.ocm)
Date: 11/30/03


Date: Sun, 30 Nov 2003 13:45:51 -0500

Hey im kinda a newbie to java so i dont know much any help would be
appreciated. Thanx in advance to anyone who does help or takes the time
to read this.
Hey i have placed a text area in a panel which uses a borderlayout.
the code goes relatively like this

     // Create a new JPanel to sit in the top right corner
     this.topRight = new JPanel();
     this.topRight.setLayout(new BorderLayout());

     String plantInfo = plantGetInformation();
     plantInformation.setMaximumSize(new Dimension(100, 300));
     plantInformation.setText(plantInfo);

   private String plantGetInformation()
   {
     String allInfo = "";
     allInfo = allInfo + "Description: " + dataPlant.getDescription() +
"\n";
     allInfo = allInfo + "Other Notes: " + dataPlant.getOtherNotes() + "\n";
       return allInfo;
   }

Anyway my problem is that when I add this information to the text field
the text field expands opff the screen to fit in the text.. The get
description returns a rather long string. Is there anyway i can have
stay at a set size and drop down automatically without using \n?

Thanx



Relevant Pages

  • what up rmp what up b n p
    ... hey hey rmp whats shaking ... maybe one day ill do the 9-5 but i dont even think so. ... groups of people gathered aronud totally getting off on shakespeare. ... i have to pee" says a beautiful young english women. ...
    (rec.music.phish)
  • Re: OT:OT:OT This week in God
    ... > thats what makes you racist,, and you dont get it!!!!! ... > i am red neck in that my neck gets red in the summer after a day in the ... i hate pooo coloured skin people,,, ... > hey yellow skinned dude- you got jaundice?? ...
    (alt.support.mult-sclerosis)
  • college assignment
    ... Hey guys, i am pretty new to VB, and am in my access year to HND, i ... have been given an assigment but i dont really understand how to do ...
    (microsoft.public.vb.general.discussion)
  • Re: MOVAPS (SSE) and Windows -> Crash
    ... Hey I dont know what you problem is but, but maybe I can give some hints. ... I really have no clue but here it is: ...
    (alt.lang.asm)
  • need help ASAP
    ... hey all, I'm having a problem and dont know exactly how to do this... ... I have one column of data (2000 lines worth) all are numerical and all ... Prev by Date: ...
    (microsoft.public.excel)