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.s etLayout(new BorderLayout()) ;
String plantInfo = plantGetInforma tion();
plantInformatio n.setMaximumSiz e(new Dimension(100, 300));
plantInformatio n.setText(plant Info);
private String plantGetInforma tion()
{
String allInfo = "";
allInfo = allInfo + "Descriptio n: " + dataPlant.getDe scription() +
"\n";
allInfo = allInfo + "Other Notes: " + dataPlant.getOt herNotes() + "\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