private synchronized void resize(int newSizeColumns, int newSizeRows)
    {
        TerminalCharacter [][]newCharacterMap = new TerminalCharacter[newSizeRows][newSizeColumns];
        for(int y = 0; y < newSizeRows; y++)
            for(int x = 0; x < newSizeColumns; x++)
                newCharacterMap[y][x] = new TerminalCharacter(
                        ' ', 
                        convertColorToAWT(Color.WHITE, false), 
                        convertColorToAWT(Color.BLACK, false), 
                        false, 
                        false, 
                        false);

        synchronized(resizeMutex) {
            for(int y = 0; y < size().getRows() && y < newSizeRows; y++) {
                for(int x = 0; x < size().getColumns() && x < newSizeColumns; x++) {
                    newCharacterMap[y][x] = this.characterMap[y][x];
                }
            }

            this.characterMap = newCharacterMap;
            SwingUtilities.invokeLater(new Runnable() {
                public void run()
                {
                    terminalFrame.pack();
                }
            });

            onResized(newSizeColumns, newSizeRows);
        }
    }