Fixed a Swing-related issue:

- when the terminal calls the frontend to update its dimensions or
  contents, this is not always done from the EDT. Ensure that these
  method calls cause all Swing-related calls to be done from the
  EDT.