title: How to find the dominant color on a JPanel?
body: <p>I am trying to create a game. There two players that are represented by two rectangles. The two rectangles move continuously and can redirected using WASD and Up,Down,Left,Right keys. Each rectangle leaves a trail of its own color wherever it goes. The goal of the game is to color the majority of the panel with your color under a time limit. I have an idea how to do everything except the part where I make the game tell me which is the most occurring color. It doesn't seem like there exists a method that does this so is there a way around this???</p>