// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import javax.swing.*;

public class Test extends JFrame {
   public Test() {
      setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      JLabel lbl = new JLabel();
      lbl.setIcon(new ImageIcon(getClass().getResource("test.jpg")));
      getContentPane().add(lbl);
      pack();
   }
   public static void main(String[] args) {
      Test f = new Test();
      f.show();
   }
}
