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

📄 rentwindow.java

📁 自己做的影碟碟出租管理系统
💻 JAVA
字号:
/**
 * @(#)RentWindow.java
 *
 *
 * @author 
 * @version 1.00 2008/5/31
 */
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;


public class RentWindow extends AppFrame{
    Container c;
    private GridBagLayout layout;
    private GridBagConstraints constraints; 
    JButton test;
    JButton ok ;
    JButton cancel;
    JLabel UserLabel;
    JLabel DiscLabel;
    JLabel TimeLabel;

    JLabel Label1=new JLabel();
    JLabel Label2=new JLabel();
    JTextField UserField=new JTextField(12);
    JTextField DiscField=new JTextField(12);
   
    
    public RentWindow() {
    	c=getContentPane();
        layout=new GridBagLayout();
    	c.setLayout(layout);
    	constraints=new GridBagConstraints();
    	 super.setTitle("删除碟片");
        UserLabel=new JLabel("输入要租的用户");
        DiscLabel=new JLabel("输入要租的碟片");
       
    	test=new JButton("还可以租吗?");
    	ok =new JButton("租赁");
    	ok.setEnabled(false);
        cancel=new JButton("取消");
        addComponent(UserLabel,0,0,1,1);
        addComponent(UserField,0,1,1,3);
        addComponent(DiscLabel,1,0,1,1);
        addComponent(DiscField,1,1,1,3);
        addComponent(Label1,3,0,1,4);
        addComponent(test,4,1,1,2);
        addComponent(ok,6,1,1,1);
        addComponent(cancel,6,3,1,1);
    
     	c.setBackground(Color.LIGHT_GRAY);
        setLocation(200,100);
        setVisible(true);
    }
    
   private void addComponent( Component component,
      int row, int column,  int height,int width )
   {
      
      constraints.gridx = column;
      constraints.gridy = row;
      constraints.gridwidth = width;   
      constraints.gridheight = height;
      layout.setConstraints( component,constraints);  
      c.add(component);      
   } 

}
    
    

⌨️ 快捷键说明

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