title: How to turn ImageIcon to gray on Swing
body: <p>I would like to know if there is some way in Swing to turn an ImageIcon to gray scale in a way like:</p>
  
  <pre><code>component.setIcon(greyed(imageIcon));
  </code></pre>