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

📄 vip.java

📁 中小型书店管理系统,主要是为了方便书店的管理而编写的管理系统.
💻 JAVA
字号:
import java.awt.*;
import java.awt.event.*;

import javax.swing.*;


public class Vip extends JFrame
{
	private JLabel label1,label2,label3,label4;
    private JButton button1,button2,button3;
    private JTextField textField1,textField2,textField3,textField4;
    private JTextArea area1;
    private GridBagLayout layout;
    private GridBagConstraints constraints;
    private Container container;
    private JRadioButton xbutton,ybutton;
    
    public Vip()
    {
    	super("VIP管理");
    	
    	container=getContentPane();
    	layout=new GridBagLayout();
    	container.setLayout(layout);
    	
    	constraints = new GridBagConstraints();
    	
    	
    	label1=new JLabel("姓名");
    	label2=new JLabel("VIP号");
    	label3=new JLabel("折");
    	label4=new JLabel("购书记录");
    	
    	
    	area1=new JTextArea(12,20);
    	
    	xbutton=new JRadioButton("姓名",true);
    	ybutton=new JRadioButton("VIP号",false);
    	
    	
    	textField1=new JTextField(6);
    	textField2=new JTextField(4);
    	textField3=new JTextField(8);
    	textField4=new JTextField(4);
    	textField4.setEditable(false);
    	
    	button1=new JButton("添加");
    	button2=new JButton("查询");
    	button3=new JButton("退出");
    	
    	addComponent(label1,0,0,2,1);
    	addComponent(textField1,0,2,2,1);
    	addComponent(label2,0,4,2,1);
    	addComponent(textField2,0,6,2,1);
    	addComponent(button1,1,0,8,1);
        addComponent(label4,2,0,3,1);
    	addComponent(area1,3,0,8,4);
    	addComponent(textField3,7,0,2,1);
    	addComponent(button2,8,0,2,1);
    	addComponent(textField4,8,4,2,1);
    	addComponent(label3,8,6,1,1);
    	addComponent(xbutton,7,2,3,1);
    	addComponent(ybutton,7,5,3,1);
    	
   
    	
    	setSize(500,450);
    	setVisible(true);
    }
    
    
    private void addComponent(Component component,int row,int column,int width,int height)
    {
    	constraints.gridx=column;
    	constraints.gridy=row;
    	
    	constraints.gridwidth=width;
    	constraints.gridheight=height;
    	
    	layout.setConstraints(component,constraints);
    	container.add(component);
    }
    public static void main(String args[])
    {
	    Vip application=new  Vip();
	
	    application.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	}
	
}	  	
    	
    	
    	
    	
    	
    	

⌨️ 快捷键说明

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