I would like to have a display like this:

[![expandable array](https://i.stack.imgur.com/MSLRW.png)](https://i.stack.imgur.com/MSLRW.png)

**goal**: each time a `char` is added, the matrix will automatically create an empty line after inserting a `char` type.

I don't know

1. if using a matrix is a good idea to achieve what I want
2. where to start, as I have not written any code yet

Thank you for helping me out, I am a beginner in java!