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

📄 test.java

📁 混响时间计算程序
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
package org.fajuntao;

import javax.swing.JFrame;
import java.lang.Math;
import java.awt.Dimension;
import java.awt.Rectangle;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Vector;

import javax.swing.ButtonGroup;
import javax.swing.JButton;
import javax.swing.JComboBox;

import javax.swing.JLabel;
import javax.swing.JMenuBar;
import javax.swing.JOptionPane;
import javax.swing.JRadioButton;
import javax.swing.JTextField;
@SuppressWarnings("serial")
public class Test extends JFrame{
	public double t=0.0000;
	public float m=0.000f;
	public float xishu[][]=new float[7][6];
    private JButton jButton1 = new JButton();
    private JButton jButton2 = new JButton();
    private JRadioButton jRadioButton1 = new JRadioButton();
    private JRadioButton jRadioButton2 = new JRadioButton();
    private JRadioButton jRadioButton3 = new JRadioButton();
    private JRadioButton jRadioButton4 = new JRadioButton();
    private JRadioButton jRadioButton5 = new JRadioButton();
    private JRadioButton jRadioButton6 = new JRadioButton();
    private JLabel jLabel1 = new JLabel();
    private JLabel jLabel2 = new JLabel();
    private JLabel jLabel3 = new JLabel();
    private JComboBox jComboBox1 = new JComboBox();
    private JMenuBar jMenuBar1 = new JMenuBar();
    private JTextField jTextField1 = new JTextField();
    private JTextField jTextField2 = new JTextField();
    private JTextField jTextField3 = new JTextField();
    private JLabel jLabel4 = new JLabel();
    private JLabel jLabel5 = new JLabel();
    private JLabel jLabel6 = new JLabel();
    private JComboBox jComboBox2 = new JComboBox();
    private JLabel jLabel7 = new JLabel();
    private JLabel jLabel8 = new JLabel();
    private JLabel jLabel9 = new JLabel();
    private JComboBox jComboBox3 = new JComboBox();
    private JComboBox jComboBox4 = new JComboBox();
    private JComboBox jComboBox5 = new JComboBox();
    private JComboBox jComboBox6 = new JComboBox();
    private JComboBox jComboBox7 = new JComboBox();
    private JComboBox jComboBox8 = new JComboBox();
    private JComboBox jComboBox9 = new JComboBox();
    private JComboBox jComboBox10 = new JComboBox();
    private JComboBox jComboBox11 = new JComboBox();
    private JComboBox jComboBox12 = new JComboBox();
    private JLabel jLabel10 = new JLabel();
    private JLabel jLabel11 = new JLabel();
    private JLabel jLabel12 = new JLabel();
    private JLabel jLabel13 = new JLabel();
    private JLabel jLabel14 = new JLabel();
    
    private JLabel jLabel15 = new JLabel();
    
    private JLabel jLabel16 = new JLabel();
  
    private JLabel jLabel17 = new JLabel();
 
    private JLabel jLabel18 = new JLabel();
   
    private JLabel jLabel19 = new JLabel();
 
    private JLabel jLabel110 = new JLabel();
  
    private JLabel jLabel111 = new JLabel();
  
    private JTextField []jt=new JTextField[18];
    public Test() {
        try {
            jbInit();
            init();
            xishu=initshuzu();
            //System.out.println(xishu[1][1]);
            } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private void jbInit() throws Exception {
        this.getContentPane().setLayout( null );
        this.setSize(new Dimension(690, 685));
        this.setJMenuBar(jMenuBar1);
        jButton1.setText("计算");
        jButton1.setBounds(new Rectangle(165, 595, 80, 35));
        jButton1.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        jButton1_actionPerformed(e);
                    }
                });
        jButton2.setText("重填");
        jButton2.setBounds(new Rectangle(440, 595, 75, 35));
        jRadioButton1.setText("125Hz");
        jRadioButton1.setBounds(new Rectangle(150, 465, 80, 45));
        jRadioButton1.setSelected(true);
        jRadioButton2.setText("250Hz");
        jRadioButton2.setBounds(new Rectangle(285, 465, 75, 45));
        jRadioButton3.setText("500Hz");
        jRadioButton3.setBounds(new Rectangle(415, 465, 80, 45));
        jRadioButton4.setText("1KHz");
        jRadioButton4.setBounds(new Rectangle(150, 530, 75, 45));
        jRadioButton5.setText("2KHz");
        jRadioButton5.setBounds(new Rectangle(285, 530, 75, 45));
        jRadioButton6.setText("4KHz");
        jRadioButton6.setBounds(new Rectangle(415, 530, 80, 45));
        jLabel1.setText("长:");
        jLabel1.setBounds(new Rectangle(150, 35, 70, 35));
        jLabel2.setText("宽:");
        jLabel2.setBounds(new Rectangle(280, 35, 70, 35));
        jLabel3.setText("高:");
        jLabel3.setBounds(new Rectangle(420, 35, 70, 35));
        jComboBox1.setBounds(new Rectangle(125, 150, 125, 30));
        ButtonGroup bg=new ButtonGroup();
        jTextField1.setBounds(new Rectangle(175, 35, 70, 35));
        jTextField2.setBounds(new Rectangle(305, 35, 70, 35));
        jTextField3.setBounds(new Rectangle(445, 35, 70, 35));
        jLabel4.setText("前部");
        jLabel4.setBounds(new Rectangle(75, 145, 50, 45));
        jLabel5.setText("后部");
        jLabel5.setBounds(new Rectangle(75, 195, 50, 45));
        jLabel6.setText("左侧");
        jLabel6.setBounds(new Rectangle(75, 245, 50, 45));
        jComboBox2.setBounds(new Rectangle(300, 150, 125, 30));
        jLabel7.setText("右侧");
        jLabel7.setBounds(new Rectangle(75, 295, 60, 45));
        jLabel8.setText("房顶");
        jLabel8.setBounds(new Rectangle(75, 350, 50, 35));
        jLabel9.setText("地板");
        jLabel9.setBounds(new Rectangle(75, 395, 55, 40));
        jComboBox3.setBounds(new Rectangle(125, 200, 125, 30));
        jComboBox4.setBounds(new Rectangle(300, 200, 125, 30));
        jComboBox5.setBounds(new Rectangle(125, 250, 125, 30));
        jComboBox6.setBounds(new Rectangle(300, 250, 125, 30));
        jComboBox7.setBounds(new Rectangle(125, 300, 125, 30));
        jComboBox8.setBounds(new Rectangle(300, 300, 125, 30));
        jComboBox9.setBounds(new Rectangle(125, 350, 125, 30));
        jComboBox10.setBounds(new Rectangle(300, 350, 125, 30));
        jComboBox11.setBounds(new Rectangle(125, 400, 125, 30));
        jComboBox12.setBounds(new Rectangle(300, 400, 125, 30));
        for(int i=0;i<jt.length;i++){
        	jt[i]=new JTextField();
        	jt[i].setText("0");
        }
        jLabel10.setText("墙壁");
        jLabel10.setBounds(new Rectangle(75, 100, 60, 40));
        jLabel11.setText("材料");
        jLabel11.setBounds(new Rectangle(140, 105, 55, 30));
        jLabel12.setText("窗和门");
        jLabel12.setBounds(new Rectangle(415, 95, 75, 30));
        jLabel13.setText("材料");
        jLabel13.setBounds(new Rectangle(305, 120, 55, 30));
        jLabel14.setText("尺寸");
        jLabel14.setBounds(new Rectangle(455, 115, 40, 40));
        jt[6].setBounds(new Rectangle(450, 250, 30, 30));
        
        jLabel15.setText("*");
        jLabel15.setBounds(new Rectangle(490, 250, 20, 30));
        jt[7].setBounds(new Rectangle(505, 250, 30, 30));
       
        jLabel16.setText("数量");
        jLabel16.setBounds(new Rectangle(570, 120, 40, 30));
        jt[8].setBounds(new Rectangle(570, 250, 30, 30));
        
        jt[3].setBounds(new Rectangle(450, 200, 30, 30));
        
        jt[4].setBounds(new Rectangle(505, 200, 30, 30));
        
        jLabel17.setText("*");
        jLabel17.setBounds(new Rectangle(490, 200, 20, 30));
        jt[5].setBounds(new Rectangle(570, 200, 30, 30));
        
        jt[0].setBounds(new Rectangle(450, 150, 30, 30));
       
        jLabel18.setText("*");
        jLabel18.setBounds(new Rectangle(490, 145, 20, 30));
        jt[1].setBounds(new Rectangle(505, 150, 30, 30));
        
        jt[2].setBounds(new Rectangle(570, 150, 30, 30));
       
        jt[9].setBounds(new Rectangle(450, 300, 30, 30));
        
        jLabel19.setText("*");
        jLabel19.setBounds(new Rectangle(490, 300, 20, 30));
        jt[10].setBounds(new Rectangle(505, 300, 30, 30));
        
        jt[11].setBounds(new Rectangle(570, 300, 30, 30));
        
        jt[12].setBounds(new Rectangle(450, 350, 30, 30));
        
        jLabel110.setText("*");
        jLabel110.setBounds(new Rectangle(490, 350, 20, 30));
        jt[13].setBounds(new Rectangle(505, 350, 30, 30));
        
        jt[14].setBounds(new Rectangle(570, 350, 30, 30));
        
        jt[15].setBounds(new Rectangle(450, 400, 30, 30));
       
        jLabel111.setText("*");
        jLabel111.setBounds(new Rectangle(490, 400, 20, 30));
        jt[16].setBounds(new Rectangle(505, 400, 30, 30));
      
        jt[17].setBounds(new Rectangle(570, 400, 30, 30));
      
        for(int i=0;i<jt.length;i++){
        	this.getContentPane().add(jt[i], null);
        }

⌨️ 快捷键说明

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