返回列表 發帖
  1. import javax.swing.JFrame;
  2. import javax.swing.JLabel;
  3. import javax.swing.ImageIcon;
  4. public class ch81
  5. {
  6.         private JFrame fr;
  7.         private JLabel la;
  8.         private ImageIcon ii;
  9.         ch81()
  10.         {
  11.                 ii=new ImageIcon(ch81.class.getResource("01.jpg"));
  12.                 la=new JLabel(ii);
  13.                 la.setBounds(0, 0, 399, 300);
  14.                 fr=new JFrame("何花");
  15.                 fr.setBounds(100, 100, 405, 328);
  16.                 fr.setVisible(true);
  17.             fr.setResizable(false);
  18.             fr.setLayout(null);
  19.             fr.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  20.             fr.add(la);
  21.                
  22.         }
  23.         public static void main(String[] args)
  24.         {
  25.             ch81 app=new ch81();
  26.         }
  27. }
複製代碼

TOP

返回列表