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

📄 jsjframe.java

📁 在线的java web 做的 学生选课系统。自己做的。大家可以一起讨论。
💻 JAVA
字号:
package gui;import javax.swing.JButton;import com.cloudgarden.layout.AnchorLayout;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import com.cloudgarden.layout.AnchorConstraint;import edu.sist200.model.Course;import edu.sist200.services.BussinessServices;import java.awt.BorderLayout;import java.util.List;import javax.swing.WindowConstants;/*** This code was generated using CloudGarden's Jigloo* SWT/Swing GUI Builder, which is free for non-commercial* use. If Jigloo is being used commercially (ie, by a corporation,* company or business for any purpose whatever) then you* should purchase a license for each developer using Jigloo.* Please visit www.cloudgarden.com for details.* Use of Jigloo implies acceptance of these licensing terms.* ************************************** A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED* for this machine, so Jigloo or this code cannot be used legally* for any corporate or commercial purpose.* **************************************/public class JsJFrame extends javax.swing.JFrame {	private JButton jButton1;	private JButton jButton2;	private JButton jButton3;	private  JsJFrame inst;	/**	* Auto-generated main method to display this JFrame	*/	public static void main(String[] args) {//	    inst = new JsJFrame();//		inst.setVisible(true);		//inst.setLocation((1024-400)/2, (768-300)/2);	}		public JsJFrame() {		super();		initGUI();			}	public void setInst(JsJFrame inst){		this.inst=inst;		inst.setLocation((1024-400)/2, (768-300)/2);	}	private void initGUI() {		try {			AnchorLayout thisLayout = new AnchorLayout();			this.getContentPane().setLayout(thisLayout);			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);			{				jButton3 = new JButton();				this.getContentPane().add(					jButton3,					new AnchorConstraint(						742,						883,						866,						692,						AnchorConstraint.ANCHOR_REL,						AnchorConstraint.ANCHOR_REL,						AnchorConstraint.ANCHOR_REL,						AnchorConstraint.ANCHOR_REL));				jButton3.setText("\u8fd4\u56de");				jButton3.setPreferredSize(new java.awt.Dimension(75, 33));				jButton3.addActionListener(new ActionListener() {					public void actionPerformed(ActionEvent evt) {						main m=new main();												m.setVisible(true);						m.setInst(m);						inst.setVisible(false);																	}				});			}			{				jButton2 = new JButton();				this.getContentPane().add(					jButton2,					new AnchorConstraint(						328,						769,						464,						544,						AnchorConstraint.ANCHOR_REL,						AnchorConstraint.ANCHOR_REL,						AnchorConstraint.ANCHOR_REL,						AnchorConstraint.ANCHOR_REL));				jButton2.setText("\u8bfe\u7a0b\u67e5\u8be2");				jButton2.setPreferredSize(new java.awt.Dimension(88, 36));				jButton2.addActionListener(new ActionListener() {					public void actionPerformed(ActionEvent evt) {						BussinessServices bs=new BussinessServices();						List l=bs.queryCou();						CXKC j=new CXKC(l);												j.setVisible(true);						j.setInst(j,1);						inst.setVisible(false);					}				});			}			{				jButton1 = new JButton();				this.getContentPane().add(					jButton1,					new AnchorConstraint(						325,						406,						464,						177,						AnchorConstraint.ANCHOR_REL,						AnchorConstraint.ANCHOR_REL,						AnchorConstraint.ANCHOR_REL,						AnchorConstraint.ANCHOR_REL));				jButton1.setText("\u6559\u5e08\u767b\u9646");				jButton1.setPreferredSize(new java.awt.Dimension(90, 37));				jButton1.addActionListener(new ActionListener() {					public void actionPerformed(ActionEvent evt) {						jsdlJF j=new jsdlJF();						j.setVisible(true);						j.setInit(j);						inst.setVisible(false);					}				});			}			pack();						setSize(400, 300);					} catch (Exception e) {			e.printStackTrace();		}	}		/**	* Auto-generated method for setting the popup menu for a component	*/	private void setComponentPopupMenu(final java.awt.Component parent, final javax.swing.JPopupMenu menu) {parent.addMouseListener(new java.awt.event.MouseAdapter() {public void mousePressed(java.awt.event.MouseEvent e) {if(e.isPopupTrigger())menu.show(parent, e.getX(), e.getY());}public void mouseReleased(java.awt.event.MouseEvent e) {if(e.isPopupTrigger())menu.show(parent, e.getX(), e.getY());}});	}}

⌨️ 快捷键说明

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