title: Java: Filling in Graphics based on 2D array as mouse held down
body: <p>So I have a JPanel that is populated by the contents of a 2D array. I have a mouse listener which changes the colour of a cell when pressed. My question is, is it possible to have the user drag the mouse over a line of cells and colour them all in succession? I have looked into mouse motion listener but this doesn't seem to help.</p>
  
  <p>Any ideas?</p>