I have googled for a while now but I don't find what I'm looking for. I'm trying to build a simple GUI where my contentPane contains a JPanel with a GridLayout.
I want a grid of say 3x3 and fill the bottom right cell with a green-background-jpanel. The rest of the cells are supposed to be white for now. How do I achieve this?
I know that I could for-loop and fill all other cells with white-background-jpanels. But that's not feasible for the rest of the project. What's the proper / non-hackerish way to do this? I just want a grid where I can say "Look, it's n x m and for now I only want to fill only e.g. row 3 column 4"