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

📄 test.java

📁 丽婴房库存销售系统 描述:C/S构架
💻 JAVA
字号:
package src1;


import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.LayoutManager;
import java.awt.*;
import javax.swing.*;

	
public class Test extends JPanel{

	
		private JTable table ;
	    private int i;
	    private JTextField         tf1,tf2,tf3,tf4,tf5,tf6,tf7,tf8,tf9;
	    private JLabel label1,label2,label3,label4,label5,label6,label7,label8,label9;
	    private JButton bt1,bt2;
	    private JPanel panel,panel2;
	    
		public Test() {
			// TODO 自动生成构造函数存根
			super();
			   //this.setVisible(true);
			   //this.setBackground(Color.yellow);
			   this.setLayout(null);
			   table = new JTable(400,5);
			   initTable();
			   JScrollPane scrollPane = new JScrollPane(table);
				 
				scrollPane.setLocation(8,8);
				scrollPane.setSize(580,400);
				this.add(scrollPane,BorderLayout.CENTER);
				
				label1 = new JLabel("新货号 ");
				
				
				label2 = new JLabel("门店号");
				
				label3 = new JLabel("仓库号");
				
				label4 = new JLabel("出库量");
			 
				tf1  =  new JTextField(15);
				tf2  =  new JTextField(15);
				tf3  =  new JTextField(15);
				tf4  =  new JTextField(15);
				panel = new JPanel();	
				panel2 = new JPanel();	
				
				bt1 = new JButton("确定");
				bt2 = new JButton("取消");
				
				
				
				//bt1.setBounds(200,520,60,30);
				//bt2.setBounds(300,520,60,30);
				panel.setBounds(40,420,480,60);
				panel.setLayout(new FlowLayout());
				panel2.setBounds(100,500,150,40);
				panel2.setLayout(new FlowLayout());
				
				panel.add(label1);panel.add(tf1);
				panel.add(label2);panel.add(tf2);
				panel.add(label3);panel.add(tf3);
				panel.add(label4);panel.add(tf4);
				
				
				
			   panel2.add(bt1);
			   panel2.add(bt2);
			   this.add(panel);
			   this.add(panel2);
		       this.setOpaque(true);
			   this.setVisible(true);
		}

		

		
		private void initTable()
		{
			table.setValueAt("新货号" ,i, 0);
			table.setValueAt("仓库号", i, 2);
			table.setValueAt("出库量", i, 3);
			table.setValueAt("门店号", i, 1);  
		    table.setValueAt("出库时间", i, 4);
			table.setVisible(true);
		    i++;
		}
	}

⌨️ 快捷键说明

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