title: How to download IntelliJ IDEA JavaBeans component of the JAR file
body: <p>How to insert a palette component of the jar file?</p>
  
  <pre><code>import javax.imageio.ImageIO;
  import javax.swing.*;
  import java.awt.*;
  import java.io.File;
  import java.io.IOException;
  
  /**
  * Created with IntelliJ IDEA.
  * User: user
  * Date: 05.07.13
  * Time: 17:51
  * To change this template use File | Settings | File Templates.
  */
  public class ImageViewerBean extends JLabel {
  private File file=null;
  int XPREFSIZE=200;
  int YPREFSIZE=200;
  public ImageViewerBean(){
  setBorder(BorderFactory.createEtchedBorder());
  }
  
  public void setFileName(String fileName)
  {
  File file1=new File(fileName);
  try {
  setIcon(new ImageIcon(ImageIO.read(file)));
  } catch (IOException e) {
  file=null;
  setIcon(null);
  }
  }
  
  public String getFileName(){
  if (file!=null)
  return file.getPath();
  else
  return null;
  }
  
  public Dimension getPreferredSize(){
  return new Dimension(XPREFSIZE,YPREFSIZE);
  }
  }
  </code></pre>
  
  <p>Manifest:</p>
  
  <p>Manifest-Version: 1.0</p>
  
  <p>Name: C:\Users\user\IdeaProjects\AWTLearn\src\ImageViewerBean.java
  Java-Bean: True</p>
  
  <p>In the manifesto, all strictly no extra spaces at the end of an empty string.</p>