// good
this.setVisible(false);
}
private ITextComponent open(File input) {
//to erase any text in the text area before adding new text
ITextComponent textComponent = new TextComponent();
StringBuffer str = new StringBuffer(1024*4);
Reader in = null;
try{
//to read the selected file
in = new FileReader(input);
//100000 is the max. char can be written in the text area
char[] buff = new char[100000];
int nch;
while((nch = in.read(buff, 0, buff.length)) != -1) {
str.append(new String(buff, 0, nch));
}
textComponent.setText(str.toString());
return(textComponent);
} catch(Exception ex){
VisualGraph.log.printException(ex);
} finally {
if(in != null) {