⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 welcomeframe.java~29~

📁 用JAVA编写的学生信息管理系统,大家可以参考参考
💻 JAVA~29~
字号:
package stumanage;

import javax.swing.*;
import java.awt.*;
import sun.awt.image.*;
import java.awt.event.*;

/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2003</p>
 * <p>Company: </p>
 * @author not attributable
 * @version 1.0
 */

public class WelcomeFrame
    extends JFrame {
  JPanel jPanel1 = new MyPanel();
  ImageIcon imageIcon1 = new ImageIcon("beautiful.jpg");
  BorderLayout borderLayout1 = new BorderLayout();
  JPanel jPanel2 = new JPanel();
  GridBagLayout gridBagLayout1 = new GridBagLayout();
  JButton jButton1 = new JButton();
  JButton jButton2 = new JButton();
  JButton jButton3 = new JButton();
  JButton jButton4 = new JButton();

  public WelcomeFrame() {
    try {
      jbInit();
    }
    catch (Exception e) {
      e.printStackTrace();
    }
  }

  public static void main(String[] args) {
    WelcomeFrame welcomeFrame = new WelcomeFrame();
    welcomeFrame.pack();
    welcomeFrame.show();
  }

  private void jbInit() throws Exception {
    imageIcon1.setDescription("beautiful.jpg");
    imageIcon1.setImageObserver(this);
    jPanel1.setLayout(borderLayout1);
    jPanel1.setMinimumSize(new Dimension(600, 400));
    jPanel1.setPreferredSize(new Dimension(600, 420));
    this.setLocale(java.util.Locale.getDefault());
    this.setResizable(true);
    this.setSize(new Dimension(747, 396));
    this.setState(Frame.NORMAL);
    jPanel2.setBackground(UIManager.getColor("RadioButtonMenuItem.selectionBackground"));
    jPanel2.setForeground(Color.black);
    jPanel2.setMinimumSize(new Dimension(100, 30));
    jPanel2.setPreferredSize(new Dimension(100, 400));
    jPanel2.setLayout(gridBagLayout1);
    jButton1.setToolTipText(" 个人信息管理");
    jButton1.setText(" 个人信息管理");
    jButton2.setToolTipText(" 选课信息管理");
    jButton2.setText(" 选课信息管理");
    jButton3.setToolTipText("奖励信息管理");
    jButton3.setText("奖励信息管理");
    jButton4.setToolTipText("职务信息管理");
    jButton4.setText("职务信息管理");
    jButton4.addActionListener(new WelcomeFrame_jButton4_actionAdapter(this));
    this.getContentPane().add(jPanel1, BorderLayout.CENTER);
    jPanel1.add(jPanel2, BorderLayout.EAST);
    jPanel2.add(jButton1,                        new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0
            ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
    jPanel2.add(jButton2,                  new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0
            ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(9, 0, 0, 0), 0, 0));
    jPanel2.add(jButton3,            new GridBagConstraints(1, 3, 1, 1, 0.0, 0.0
            ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(10, 0, 0, 0), 0, 0));
    jPanel2.add(jButton4,       new GridBagConstraints(0, 0, 2, 1, 0.0, 0.0
            ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 10, 0), 12, 0));
  }


  class MyPanel
      extends JPanel {
    public void paintComponent(Graphics g) {
      super.paintComponent(g);
      imageIcon1.paintIcon(this, g, 0, 0);
     }

  }

  void jButton4_actionPerformed(ActionEvent e) {
    MainFrame.main( null );
  }

}

class WelcomeFrame_jButton4_actionAdapter implements java.awt.event.ActionListener {
  WelcomeFrame adaptee;

  WelcomeFrame_jButton4_actionAdapter(WelcomeFrame adaptee) {
    this.adaptee = adaptee;
  }
  public void actionPerformed(ActionEvent e) {
    adaptee.jButton4_actionPerformed(e);
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -