📄 xsjframe.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 java.awt.BorderLayout;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 XsJFrame extends javax.swing.JFrame { private JButton jButton1; private JButton jButton2; private JButton jButton3; static XsJFrame inst; /** * Auto-generated main method to display this JFrame */ public static void main(String[] args) { inst = new XsJFrame(); inst.setVisible(true); } public XsJFrame() { super(); initGUI(); } public void setInst(XsJFrame 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( 689, 779, 847, 539, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL)); jButton3.setText("\u8fd4\u56de"); jButton3.setPreferredSize(new java.awt.Dimension(94, 42)); 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( 287, 830, 400, 539, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL)); jButton2.setText("\u5b66\u751f\u9009\u8bfe"); jButton2.setPreferredSize(new java.awt.Dimension(114, 30)); jButton2.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { XSDL xs=new XSDL(); xs.setInst(xs); xs.setVisible(true); inst.setVisible(false); } }); } { jButton1 = new JButton(); this.getContentPane().add( jButton1, new AnchorConstraint( 287, 345, 407, 95, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL)); jButton1.setText("\u5b66\u751f\u6ce8\u518c"); jButton1.setPreferredSize(new java.awt.Dimension(98, 32)); jButton1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { XSZC xs=new XSZC(); xs.setInst(xs); xs.setVisible(true); 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 + -