📄 delchoicecourseinfo.java
字号:
package jin.internalFrame;
import java.awt.*;
import javax.swing.*;
import jin.handler.*;
import jin.view.ButtonsPanel;
//删除选课信息,可以从本人的选课信息中选择选课信息进行删除。
//已经从选课信息删除的选修课程,必须能够出现在可选的开课信息中。
public class DelChoiceCourseInfo extends JInternalFrame
{
private JComboBox comboBox;
private JLabel label;
private ButtonsPanel buttonsPanel;
private JPanel[] panels;
private JDesktopPane desktopPane;
private JFrame frame;
private String id;
public DelChoiceCourseInfo(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();
comboBox.addItem("请选择");
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);
DelChoiceCourseInfoHandler handler=new DelChoiceCourseInfoHandler(this,id);
this.setSize(230,170);
this.setVisible(true);
}
public static void main(String args[])
{
JFrame frame=new JFrame();
JDesktopPane desktopPane=new JDesktopPane();
DelChoiceCourseInfo app=new DelChoiceCourseInfo(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 + -