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

📄 1068592be750001d1d14f346b68412eb

📁 学生管理系统.对学生信息管理的一个应用软件!
💻
字号:
import javax.swing.*; 
import java.sql.*;
import java.awt.*;
import javax.swing.border.*;
import java.awt.event.*;
import java.sql.DriverManager;
class addcourse1 extends JFrame implements ActionListener
{  Box baseBox,boxV1,boxV2;
   TextField noText,courseText,teacherText;
   Label noLabel,courseLabel,teacherLabel;
   Button sureButton;
   JPanel panel=new JPanel();
   addcourse1(String s)
   {  super(s);
      noLabel=new Label("学号",Label.LEFT);
	  courseLabel=new Label("科目",Label.LEFT);
	  teacherLabel=new Label("密码",Label.LEFT);
	  noText=new TextField(10);
	  courseText=new TextField(10);
	  teacherText=new TextField(10);
	  
      sureButton=new Button("确定");
	
	  boxV1=Box.createVerticalBox();
	  boxV1.add(noLabel);
	  boxV1.add(Box.createVerticalStrut(5));
	  boxV1.add(courseLabel);
	  boxV1.add(Box.createVerticalStrut(5));
	  boxV1.add(teacherLabel);
	 
	  boxV1.add(Box.createVerticalStrut(8));
	 // boxV1.add(label1);
	  
	  boxV2=Box.createVerticalBox();
	  boxV2.add(Box.createVerticalStrut(5));
	  boxV2.add(noText);
	  boxV2.add(Box.createVerticalStrut(5));
	  boxV2.add(courseText);
	  boxV2.add(Box.createVerticalStrut(5));
	  boxV2.add(teacherText);
	  sureButton.addActionListener(this);
	  boxV2.add(Box.createVerticalStrut(8));
	  boxV2.add(Box.createVerticalStrut(5));
	  boxV2.add(sureButton);
	  sureButton.addActionListener(this);
	//  boxV2.add(label);
	  
	  baseBox=Box.createHorizontalBox();
	  baseBox.add(boxV1);
	  baseBox.add(Box.createHorizontalStrut(5));
	  baseBox.add(boxV2);
	  
	  
	  setLayout(new FlowLayout());
	  add(baseBox);
	  
	  
      
      this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
	  setBounds(120,120,250,250);
	  setVisible(true);
	  validate();
   }
   public void actionPerformed(ActionEvent e)
   {
	   
   }
}
public class addcourse
{
	public static void main(String args[])
	{
		addcourse1 win=new addcourse1("课程更改");
	}
}

⌨️ 快捷键说明

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