package netmatch;

import javax.swing.JPanel;
import javax.swing.ImageIcon;
import java.awt.Graphics;
import java.awt.Dimension;
import java.awt.BorderLayout;

public class JAboutPanel extends JPanel {
  ImageIcon img;

  public JAboutPanel(ImageIcon icon) {
    img = icon;
    setLayout(new BorderLayout());
    setOpaque(false);
  }

  public void paint(Graphics g) {
    img.paintIcon(this, g, 0, 0);
    super.paint(g);
  }

  public Dimension getPreferredSize() {
    return new Dimension(img.getIconWidth(), img.getIconHeight());
  }
}
