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