📄 searchoicecourinfobyopencourid.java
字号:
//可以按照开课教师姓名、开课名称(只有开课编号)查询选课信息。
//显示的选课信息包括:学生姓名、课程名称、开课教师姓名、开课学期、开课学年五个数据项。
package jin.internalFrame;
import java.awt.*;
import javax.swing.*;
import jin.handler.*;
import jin.view.ButtonsPanel;
//按开课编号查询
public class SearChoiceCourInfoByOpenCourID extends JInternalFrame
{
private JLabel label;
private JComboBox comboBox;
private JPanel panel;
private ButtonsPanel buttonsPanel;
private JDesktopPane desktopPane;
private JFrame frame;
//private String id;
public SearChoiceCourInfoByOpenCourID(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();
buttonsPanel=new ButtonsPanel(2);
String str[]={"确定","取消"
};
buttonsPanel.setTitles(str);
panel=new JPanel();
panel.add(label);
panel.add(comboBox);
panel.add(buttonsPanel);
setLayout(new BorderLayout());
add(panel,BorderLayout.NORTH);
desktopPane.add(this);
frame.add(desktopPane);
SearChoiceCourInfoByOpenCourIDHandler handler=new SearChoiceCourInfoByOpenCourIDHandler(this);
this.setSize(450,450);
this.setVisible(true);
}
public JComboBox getComboBox()
{
return comboBox;
}
public ButtonsPanel getButtonsPanel()
{
return buttonsPanel;
}
public static void main(String args[])
{
JFrame frame=new JFrame();
JDesktopPane desktopPane=new JDesktopPane();
SearChoiceCourInfoByOpenCourID app=new SearChoiceCourInfoByOpenCourID(frame,desktopPane);
frame.setSize(500,500);
frame.setVisible(true);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -