package yi.iu.imgdb.desc.gui;

import javax.swing.*;

/**
 * ImageDescApplication is the entrance class for the image description
 * application.  It basically news the "ImageDescFrame" and shows it.
 */
public class ImageDescApplication {
  boolean packFrame = true;

  //Construct the application
  public ImageDescApplication() {
    ImageDescFrame frame = new ImageDescFrame();
    //Validate frames that have preset sizes
    //Pack frames that have useful preferred size info, e.g. from their layout
    if (packFrame) {
      frame.pack();
    }
    else {
      frame.validate();
    }
    frame.setVisible(true);
  }

  //Main method
  public static void main(String[] args) {
    try {
      UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    }
    catch(Exception e) {
      e.printStackTrace();
    }
    new ImageDescApplication();
  }
}