}
protected Rectangle getPreferredSize() {
if (_label.indexOf("\n") == -1) {
return new Rectangle(_label.length(),1);
} else {
StringTokenizer tokenizer = new StringTokenizer(_label,"\n");
int width=0;
int height=0;
while (tokenizer.hasMoreElements()) {
String token = tokenizer.nextToken();
height++;
if (token.length()>width) {
width = token.length();
}
}
height = (height == 0)?1:height;
return new Rectangle(width, height);
}
}