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

📄 searmajinfobymajname.java

📁 在本系统中
💻 JAVA
字号:

//可以按照专业编号、专业名称、院系名称分别查询专业信息,也可以查询所有的专业信息。
//显示的专业信息包括:专业编号、专业名称、院系名称三个数据项。

//按照专业编号查询
package jin.internalFrame;

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


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

public class SearMajInfoByMajName extends JInternalFrame 
{
	private JLabel label;
	private JTextField field;
	
	private JPanel panel;
	private ButtonsPanel buttonsPanel;	
	
	private JDesktopPane desktopPane;
	private JFrame frame;
	//private String id;
	
	public SearMajInfoByMajName(JFrame frame,JDesktopPane desktopPane)  //,String id
	{
		super("",true,true,true,true);
		this.frame=frame;
		this.desktopPane=desktopPane;
		//this.id=id;
		
		label=new JLabel("输入专业名称");
		field=new JTextField(6);
		buttonsPanel=new ButtonsPanel(2);
		
		String str[]={"确定","取消"
		};
		
		buttonsPanel.setTitles(str);	
		panel=new JPanel();
		panel.add(label);
		panel.add(field);
		panel.add(buttonsPanel);	
		
		setLayout(new BorderLayout());
		add(panel,BorderLayout.NORTH);
		
		desktopPane.add(this);
		frame.add(desktopPane);	
		
		SearMajInfoByMajNameHandler handler=new SearMajInfoByMajNameHandler(this);
		
		this.setSize(450,450);
		this.setVisible(true);
	}
	
	
	public JTextField getField()
	{
		return field;
	}
	public ButtonsPanel getButtonsPanel()
	{
		return buttonsPanel;
	}
	
	public static void main(String args[])
	{
		JFrame frame=new JFrame();
	    JDesktopPane desktopPane=new JDesktopPane();
	    SearMajInfoByMajName app=new SearMajInfoByMajName(frame,desktopPane);
	    
	    frame.setSize(500,500);
	    frame.setVisible(true);	    
	}
}

⌨️ 快捷键说明

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