Bug fix : crash when terminalPanel size does not match backBuffer size

Hi Dmitry!

Here is a patch that fix a crash when you create a new `SwingTerminalPanel` with a `BackBuffer` which has a smaller size.
Once the terminal has reached the limit of the back buffer, an exception is thrown and the process won't recover.

Regards,
Clément