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

📄 claupdateframe.java

📁 包含了学生管理系统的一些基本操作以及相关窗口页面实现。
💻 JAVA
字号:
package com.hb.studentmanager.ui;

import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ComboBoxModel;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;

import javax.swing.WindowConstants;

import com.hb.studentmanager.action.ClaAction;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class ClaUpdateFrame extends javax.swing.JDialog {
	public JPanel mainPanel1;
	private JLabel tsLabel1;
	public JButton koButton1;
	public JComboBox speidComboBox1;
	public JLabel speLabel1;
	public JComboBox teaidComboBox1;
	public JLabel teaidLabel1;
	public JLabel idLabel1;
	public JLabel claidLabel1;
	ClaMainFrame cmf=new ClaMainFrame();

	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(String[] args) {
		//ClaUpdateFrame inst = new ClaUpdateFrame();
		//inst.setVisible(true);
	}
	
	public ClaUpdateFrame(ClaMainFrame cmf) {
		super();
		this.cmf=cmf;
		initGUI();
		int width=Toolkit.getDefaultToolkit().getScreenSize().width;
		int height=Toolkit.getDefaultToolkit().getScreenSize().height;
		this.setLocation((width-400)/2, (height-300)/2);
		this.setResizable(false);
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			this.setTitle("\u4fee\u6539\u73ed\u7ea7\u4fe1\u606f");
			getContentPane().setLayout(null);
			{
				mainPanel1 = new JPanel();
				getContentPane().add(mainPanel1);
				mainPanel1.setBounds(0, 0, 392, 273);
				mainPanel1.setLayout(null);
				{
					claidLabel1 = new JLabel();
					mainPanel1.add(claidLabel1);
					claidLabel1.setText("\u663e\u793a\u73ed\u7ea7\u53f7");
					claidLabel1.setBounds(126, 21, 224, 28);
				}
				{
					idLabel1 = new JLabel();
					mainPanel1.add(idLabel1);
					idLabel1.setText("\u73ed\u7ea7\u53f7\uff1a");
					idLabel1.setBounds(35, 21, 63, 28);
				}
				{
					teaidLabel1 = new JLabel();
					mainPanel1.add(teaidLabel1);
					teaidLabel1.setText("\u73ed\u4e3b\u4efb\u7f16\u53f7:");
					teaidLabel1.setBounds(35, 77, 70, 28);
				}
				{
					DefaultComboBoxModel teaidComboBox1Model = new DefaultComboBoxModel();
					ClaAction ca=new ClaAction();
					ca.getTeaid(teaidComboBox1Model);
					teaidComboBox1 = new JComboBox();
					mainPanel1.add(teaidComboBox1);
					teaidComboBox1.setModel(teaidComboBox1Model);
					teaidComboBox1.setBounds(126, 77, 231, 28);
				}
				{
					speLabel1 = new JLabel();
					mainPanel1.add(speLabel1);
					speLabel1.setText("\u4e13\u4e1a\u7f16\u53f7:");
					speLabel1.setBounds(35, 140, 63, 28);
				}
				{
					DefaultComboBoxModel speidComboBox1Model = new DefaultComboBoxModel();
					ClaAction ca=new ClaAction();
					ca.getSeaid(speidComboBox1Model);
					speidComboBox1 = new JComboBox();
					mainPanel1.add(speidComboBox1);
					speidComboBox1.setModel(speidComboBox1Model);
					speidComboBox1.setBounds(126, 140, 231, 28);
				}
				{
					koButton1 = new JButton();
					mainPanel1.add(koButton1);
					koButton1.setText("\u63d0\u4ea4");
					koButton1.setBounds(287, 210, 77, 28);
					koButton1.addActionListener(new ActionListener() {
						public void actionPerformed(ActionEvent evt) {
							koButton1ActionPerformed(evt);
						}
					});
				}
				{
					tsLabel1 = new JLabel();
					mainPanel1.add(tsLabel1);
					tsLabel1.setText("*\u4e13\u4e1a\u4ee3\u53f7\u6700\u597d\u4e0d\u8981\u4fee\u6539*");
					tsLabel1.setBounds(126, 175, 231, 28);
				}
			}
			pack();
			setSize(400, 300);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	private void koButton1ActionPerformed(ActionEvent evt) {
		ClaAction ca=new ClaAction();
		try{
		int i=JOptionPane.showConfirmDialog(this, "是否确定修改!", "警告!", JOptionPane.OK_OPTION);
		if(i==1)
		{
			return;
		}
		else
		{
		ca.addclass1(this);
		this.setVisible(false);
		cmf.gettable(cmf.s1,cmf.s2,cmf.s3,cmf.s4);
		}
		}catch(Exception e)
		{
			e.printStackTrace();
		}
	}

}

⌨️ 快捷键说明

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