Rendering is done through JTable with custom cell renderers. Each cell is a JPanel that paints whatever should be there - walls, pellets, Pacman, ghosts, fruits, upgrades. Had to do it this way ...