hi,
I have a frame with 2 JTextAreas one on the left and one on the right.
they both get initialized in the constructor of the JFrame. I am trying to load a txt file into the left side, but everytime it only works for the first load and after that i get a blank screen. is there like an update or repaint i should use? thx in advance.
public void actionPerformed(ActionEvent event)
{
String eventStr = event.getActionCommand();
JComponent c = (JComponent) event.getSource ();
if(eventStr.equals("Open"))
{
FileDialog fd = new FileDialog(Display.this);
int status = chooser.showOpenDialog(Display.this);
if(status == JFileChooser.APPROVE_OPTION)
{
File f = chooser.getSelectedFile();
//System.out.println(getContents(f));
left.setText(getContents(f));
//more stuff .....
}
}