repaint components in a loop
问题 I'm creating a simple game and I'd like to repaint the board after every move. So, after I call move(), what I would like to do is this: (by the way, a View is a JComponent that holds pieces; since the number of pieces has changed after the move, it needs to be repainted) for(View v : views){ v.repaint(); } It's not working. When I call repaint() on a single View, it works fine. I tried using paintImmediately , and revalidate , and update ... nothing works within the loop. Any ideas? Thanks