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

📄 addchoicecourseinfo.java

📁 在本系统中
💻 JAVA
字号:

package jin.internalFrame;

import java.awt.*;
import javax.swing.*;


import jin.handler.*;
import jin.view.ButtonsPanel;

//在添加选课信息时,要求从开课信息中选择开课编号。选课信息包括学生学号、开课编号两个数据项。
//已经选择为选修课程的信息不能再出现在可选的开课信息中。

public class AddChoiceCourseInfo extends JInternalFrame
{
	private JComboBox comboBox;
	private JLabel label;
	private ButtonsPanel buttonsPanel;
	private JPanel[] panels;
	
	private JDesktopPane desktopPane;
	private JFrame frame;
	private String id;
	
	
	public AddChoiceCourseInfo(JFrame frame,JDesktopPane desktopPane,String id)
	{
		super("",true,true,true,true);
		this.frame=frame;
		this.desktopPane=desktopPane;
		this.id=id;
		
		label=new JLabel("选择开课编号");
		comboBox=new JComboBox();
		
		panels=new JPanel[2];
		buttonsPanel=new ButtonsPanel(2);
		String str[]={"确定","取消"
		};
		
		buttonsPanel.setTitles(str);
		
		setLayout(new GridLayout(2,1));
		for(int i=0;i<2;i++)
		{
			panels[i]=new JPanel();
			add(panels[i]);
		}
		
		panels[0].add(label);
		panels[0].add(comboBox);
		panels[1].add(buttonsPanel);
		
		
		desktopPane.add(this);
		frame.add(desktopPane);	
		
		AddChoiceCourseInfoHandler handler=new AddChoiceCourseInfoHandler(this,id);
		
		this.setSize(230,170);
		this.setVisible(true);		
	}
	

	public static void main(String args[])
	{
		JFrame frame=new JFrame();
	    JDesktopPane desktopPane=new JDesktopPane();
	    AddChoiceCourseInfo app=new AddChoiceCourseInfo(frame,desktopPane,"101002");
	    
	    frame.setSize(500,500);
	    frame.setVisible(true);	    
	}
	
	public ButtonsPanel getButtonsPanel()
	{
		return buttonsPanel;
	}
	
	public JComboBox getComboBox()
	{
		return comboBox;
	}
}

⌨️ 快捷键说明

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