Commits

myuhe  committed 0e24935

本数密度の変化を描画する機能を追加

  • Participants
  • Parent commits 42c21d7

Comments (0)

Files changed (7)

File build/built-jar.properties

-#Fri, 30 Mar 2012 18:22:43 +0900
+#Fri, 30 Mar 2012 19:47:52 +0900
 
 
 D\:\\yamamon=

File build/classes/YaMaMon/main.properties

 HeightTable.text=\u6a39\u9ad8
 optTable.text=\u5099\u8003
 aboutLabel.text=<html>YaMaMon 0.0.1<br/> \u958b\u767a\u7248
-volumeButton.text=\u672c\u6570\u5bc6\u5ea6\u5909\u5316
+volumeButton.text=\u672c\u6570\u5bc6\u5ea6\u306e\u5909\u5316
 densityLabel.text=\u7acb\u6728\u5bc6\u5ea6(\u672c/ha)
 dbhLabel.text=\u5e73\u5747\u80f8\u9ad8\u76f4\u5f84(cm)
 RyButton.text=\u53ce\u91cf\u6bd4\u6570\u306e\u5909\u5316

File src/YaMaMon/DensityNumGraph.form

+<?xml version="1.0" encoding="UTF-8" ?>
+
+<Form version="1.3" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
+  <NonVisualComponents>
+    <Component class="YaMaMon.MetaForest" name="metaforest">
+      <AuxValues>
+        <AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="metaforest.clone();"/>
+      </AuxValues>
+    </Component>
+  </NonVisualComponents>
+  <Properties>
+    <Property name="defaultCloseOperation" type="int" value="3"/>
+  </Properties>
+  <SyntheticProperties>
+    <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
+  </SyntheticProperties>
+  <AuxValues>
+    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
+    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
+    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="2"/>
+    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
+  </AuxValues>
+
+  <Layout>
+    <DimensionLayout dim="0">
+      <Group type="103" groupAlignment="0" attributes="0">
+          <EmptySpace min="0" pref="400" max="32767" attributes="0"/>
+      </Group>
+    </DimensionLayout>
+    <DimensionLayout dim="1">
+      <Group type="103" groupAlignment="0" attributes="0">
+          <EmptySpace min="0" pref="300" max="32767" attributes="0"/>
+      </Group>
+    </DimensionLayout>
+  </Layout>
+</Form>

File src/YaMaMon/DensityNumGraph.java

+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/*
+ * HeightGraph.java
+ *
+ * Created on 2011/08/04, 14:56:53
+ */
+package YaMaMon;
+
+import org.jfree.chart.axis.ValueAxis;
+import org.jfree.chart.plot.XYPlot;
+import org.jfree.chart.ChartFactory;
+//Jfreechartでの文字化け対策
+import org.jfree.chart.StandardChartTheme;
+import javax.swing.JFrame;
+import java.awt.BorderLayout;
+import org.jfree.chart.ChartPanel;
+import org.jfree.chart.JFreeChart;
+import org.jfree.chart.plot.PlotOrientation;
+import org.jfree.data.function.Function2D;
+//import org.jfree.data.general.DatasetUtilities;
+import org.jfree.data.xy.XYDataset;
+import org.jfree.data.xy.XYSeries;
+import org.jfree.data.xy.XYSeriesCollection;
+
+
+import static java.lang.Math.* ;
+
+
+/**
+ *
+ * @author Maeda Yuhei
+ */
+public class DensityNumGraph extends javax.swing.JFrame {
+    
+    /**
+     * XYDatasetのオブジェクト作成
+     */
+    public final XYDataset createXYDataset(MetaForest metaforest) {
+        if (metaforest == null) throw new NullPointerException("metaforest is null");
+        this.metaforest = metaforest;
+
+        XYSeriesCollection xySeriesCollection = new XYSeriesCollection();
+	XYSeries xySeries;
+        xySeries = new XYSeries("本数密度");
+        double age = metaforest.getAge();
+        double dbh = metaforest.getDbh();
+        double height = metaforest.getHeight();
+        double density = metaforest.getDensity();
+      //  double height;
+        double estVolume;
+        Integer[] ageArray = metaforest.getAgeArray();
+        Integer[] ratioArray = metaforest.getratioArray();
+        
+        //     System.out.println(ratioArray[0]);
+        //     System.out.println(ratioArray[1]);
+        //     System.out.println(ratioArray[2]);
+        
+        
+        double paramC = 1.9d;
+        double paramB = -0.032d;
+        double paramA = height / Math.pow( (1 - exp(paramB * age)), paramC);
+        int thinFlag = 0;
+        double Ry;
+        double diffRy;
+        double ratioDead;
+        
+        for (double incAge = age ; incAge < 100; incAge++) {
+
+            Ry =(0.068509 
+                    * Math.pow(height,-1.347464)
+                    + 2658.2 * Math.pow(height, -2.814651)
+                    / Math.pow(10, 5.3083) * Math.pow(height, -1.4672))
+                    / (0.068509 * Math.pow(height, -1.347464) + 2658.2
+                    * Math.pow(height, -2.814651) / density);
+            
+            //System.out.println(ageArray[thinFlag]);
+            //System.out.println((int)incAge);
+            //System.out.println(ageArray.length >= thinFlag + 1);
+            if(ageArray.length >= thinFlag + 1){
+                if(ageArray[thinFlag].equals((int)incAge) ){
+                    density = density * (100 - ratioArray[thinFlag]) / 100;
+                    //System.out.println("間伐林齢" + density);
+                    thinFlag++;
+                }
+            }
+            
+            height = paramA * Math.pow((1 - exp(paramB * incAge)), paramC);
+            
+
+            
+            estVolume = density 
+                    * Math.pow(10d, (-4.203818 + 1.819629 * Math.log10(dbh)
+                    + 1.025738 * Math.log10(height)));
+        
+
+            System.out.println("収量比数: " + Ry);
+            
+            
+            
+    
+    
+                diffRy =((0.068509 
+                    * Math.pow(height,-1.347464)
+                    + 2658.2 * Math.pow(height, -2.814651)
+                    / Math.pow(10, 5.3083) * Math.pow(height, -1.4672))
+                    / (0.068509 * Math.pow(height, -1.347464) + 2658.2
+                    * Math.pow(height, -2.814651) / density)) - Ry;
+            
+            if(diffRy > 0){
+                ratioDead = 0.0793 * Math.pow(Math.E, 6.0454 *Ry);
+                System.out.println("diffRy: " + diffRy);
+                System.out.println("ratioDead: " + ratioDead);
+                density = density - density * ratioDead/100 * diffRy /0.1;
+            }
+            xySeries.add(incAge, density);
+            
+            dbh = dbh
+                    + (3.06915 * exp(-1 * 0.022311 * incAge)
+                    + 2.8 * (4.8042 - Math.log10(density)
+                    - 1.3136 * Math.log10(dbh)));
+          //  System.out.println(estVolume);
+          //  System.out.println(height);
+            System.out.println(density);        
+        }
+
+        xySeriesCollection.addSeries(xySeries);
+        return xySeriesCollection;
+    }
+    
+    
+    /** Creates new form VolumeGraph */
+    public DensityNumGraph(MetaForest metaforest) {
+        if (metaforest == null) throw new NullPointerException("metaforest is null");
+        this.metaforest = metaforest;
+
+        final double age = metaforest.getAge();
+        final double height = metaforest.getHeight();
+    // 無名クラス
+
+    //Jfreechartでの文字化け対策
+    ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
+
+    double xmin = 0.0d;
+    double xmax = 100.0d;
+
+    String seriesKey = "本数密度";
+
+    //XYDataset dataset = DatasetUtilities.sampleFunction2D(cosh, xmin, xmax, 1000, seriesKey);
+    XYDataset dataset = createXYDataset(metaforest);
+    JFreeChart chart = 
+            ChartFactory.createXYLineChart("本数密度の変化", "林齢", "本数密度(本/ha)", dataset, PlotOrientation.VERTICAL, true, true, false);
+    setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
+    XYPlot xyPlot = chart.getXYPlot();
+    ValueAxis yAxis = xyPlot.getRangeAxis();
+    yAxis.setAutoRange(false);
+    yAxis.setRange(0.0, 4000);
+    ValueAxis xAxis = xyPlot.getDomainAxis();
+    xAxis.setAutoRange(false);
+    xAxis.setRange(0,100);
+    setBounds(10, 10, 400, 300);
+    setTitle("本数密度の変化");
+
+    ChartPanel cpanel = new ChartPanel(chart);
+    getContentPane().add(cpanel, BorderLayout.CENTER);
+    }
+
+    /** This method is called from within the constructor to
+     * initialize the form.
+     * WARNING: Do NOT modify this code. The content of this method is
+     * always regenerated by the Form Editor.
+     */
+    @SuppressWarnings("unchecked")
+    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+    private void initComponents() {
+
+        metaforest = metaforest.clone();
+
+        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
+
+        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
+        getContentPane().setLayout(layout);
+        layout.setHorizontalGroup(
+            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+            .add(0, 400, Short.MAX_VALUE)
+        );
+        layout.setVerticalGroup(
+            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+            .add(0, 300, Short.MAX_VALUE)
+        );
+
+        pack();
+    }// </editor-fold>//GEN-END:initComponents
+
+    /**
+     * @param args the command line arguments
+     */
+    public static void main(String args[]) {
+        /* Set the Nimbus look and feel */
+        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
+        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
+         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
+         */
+        try {
+            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
+                if ("Nimbus".equals(info.getName())) {
+                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
+                    break;
+                }
+            }
+        } catch (ClassNotFoundException ex) {
+            java.util.logging.Logger.getLogger(DensityGraph.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+        } catch (InstantiationException ex) {
+            java.util.logging.Logger.getLogger(DensityGraph.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+        } catch (IllegalAccessException ex) {
+            java.util.logging.Logger.getLogger(DensityGraph.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
+            java.util.logging.Logger.getLogger(DensityGraph.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+        }
+        //</editor-fold>
+
+        /* Create and display the form */
+        java.awt.EventQueue.invokeLater(new Runnable() {
+
+            @Override
+            public void run() {
+               // new HeightGraph().setVisible(true);
+            }
+        });
+    }
+    // Variables declaration - do not modify//GEN-BEGIN:variables
+    private YaMaMon.MetaForest metaforest;
+    // End of variables declaration//GEN-END:variables
+}

File src/YaMaMon/MainFrame.form

                 </Constraint>
               </Constraints>
             </Component>
-            <Component class="javax.swing.JButton" name="growthButton">
+            <Component class="javax.swing.JButton" name="densityButton">
               <Properties>
                 <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
                   <ResourceString bundle="YaMaMon/main.properties" key="volumeButton.text" replaceFormat="java.util.ResourceBundle.getBundle(&quot;{bundleNameSlashes}&quot;).getString(&quot;{key}&quot;)"/>
                 </Property>
               </Properties>
               <Events>
-                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="growthButtonpredictVolumePerformed"/>
+                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="densityButtonpredictVolumePerformed"/>
               </Events>
               <Constraints>
                 <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
                 </Constraint>
               </Constraints>
             </Component>
-            <Component class="javax.swing.JButton" name="densityButton">
+            <Component class="javax.swing.JButton" name="growthButton">
               <Properties>
                 <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
                   <ResourceString bundle="YaMaMon/main.properties" key="growthButton.text" replaceFormat="java.util.ResourceBundle.getBundle(&quot;{bundleNameSlashes}&quot;).getString(&quot;{key}&quot;)"/>
                 </Constraint>
               </Constraints>
             </Component>
-            <Component class="javax.swing.JButton" name="RyButton1">
+            <Component class="javax.swing.JButton" name="RyButton">
               <Properties>
                 <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
                   <ResourceString bundle="YaMaMon/main.properties" key="RyButton.text" replaceFormat="java.util.ResourceBundle.getBundle(&quot;{bundleNameSlashes}&quot;).getString(&quot;{key}&quot;)"/>
                 </Property>
               </Properties>
               <Events>
-                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="RyButton1predictVolumePerformed"/>
+                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="RyButtonpredictVolumePerformed"/>
               </Events>
               <Constraints>
                 <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
                 </Constraint>
               </Constraints>
             </Component>
-            <Component class="javax.swing.JButton" name="jButton3">
+            <Component class="javax.swing.JButton" name="heightButton">
               <Properties>
                 <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
                   <ResourceString bundle="YaMaMon/main.properties" key="heightButton.text" replaceFormat="java.util.ResourceBundle.getBundle(&quot;{bundleNameSlashes}&quot;).getString(&quot;{key}&quot;)"/>
                 </Property>
               </Properties>
               <Events>
-                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton3ActionPerformed"/>
+                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="heightButtonActionPerformed"/>
               </Events>
               <AuxValues>
                 <AuxValue name="JavaCodeGenerator_SerializeTo" type="java.lang.String" value="MainFrame_jButton1"/>

File src/YaMaMon/MainFrame.java

     private About about ;
     private HeightGraph  heightgraph ;
     private VolumeGraph  volumeGraph ;
+    private DensityNumGraph densityGraph;
     
     private  class NumericFIeld extends TextField {
         private int column, length;
         thinRatioField4 = new NumericFIeld(2);
         thinRatioField5 = new NumericFIeld(2);
         thinRatioLabel = new java.awt.Label();
+        densityButton = new javax.swing.JButton();
         growthButton = new javax.swing.JButton();
-        densityButton = new javax.swing.JButton();
-        RyButton1 = new javax.swing.JButton();
-        jButton3 = new javax.swing.JButton();
+        RyButton = new javax.swing.JButton();
+        heightButton = new javax.swing.JButton();
         jScrollPane1 = new javax.swing.JScrollPane();
         jTable1 = new javax.swing.JTable();
         jMenuBar1 = new javax.swing.JMenuBar();
         gridBagConstraints.gridy = 0;
         jPanel1.add(thinRatioLabel, gridBagConstraints);
 
-        growthButton.setText(bundle.getString("volumeButton.text")); // NOI18N
-        growthButton.addActionListener(new java.awt.event.ActionListener() {
+        densityButton.setText(bundle.getString("volumeButton.text")); // NOI18N
+        densityButton.addActionListener(new java.awt.event.ActionListener() {
             public void actionPerformed(java.awt.event.ActionEvent evt) {
-                growthButtonpredictVolumePerformed(evt);
+                densityButtonpredictVolumePerformed(evt);
             }
         });
         gridBagConstraints = new java.awt.GridBagConstraints();
         gridBagConstraints.gridy = 7;
         gridBagConstraints.ipady = 7;
         gridBagConstraints.insets = new java.awt.Insets(0, 0, 12, 0);
-        jPanel1.add(growthButton, gridBagConstraints);
+        jPanel1.add(densityButton, gridBagConstraints);
 
-        densityButton.setText(bundle.getString("growthButton.text")); // NOI18N
-        densityButton.addActionListener(new java.awt.event.ActionListener() {
+        growthButton.setText(bundle.getString("growthButton.text")); // NOI18N
+        growthButton.addActionListener(new java.awt.event.ActionListener() {
             public void actionPerformed(java.awt.event.ActionEvent evt) {
                 predictVolumePerformed(evt);
             }
         gridBagConstraints.gridwidth = 3;
         gridBagConstraints.ipady = 7;
         gridBagConstraints.insets = new java.awt.Insets(12, 0, 12, 0);
-        jPanel1.add(densityButton, gridBagConstraints);
+        jPanel1.add(growthButton, gridBagConstraints);
 
-        RyButton1.setText(bundle.getString("RyButton.text")); // NOI18N
-        RyButton1.addActionListener(new java.awt.event.ActionListener() {
+        RyButton.setText(bundle.getString("RyButton.text")); // NOI18N
+        RyButton.addActionListener(new java.awt.event.ActionListener() {
             public void actionPerformed(java.awt.event.ActionEvent evt) {
-                RyButton1predictVolumePerformed(evt);
+                RyButtonpredictVolumePerformed(evt);
             }
         });
         gridBagConstraints = new java.awt.GridBagConstraints();
         gridBagConstraints.gridwidth = 3;
         gridBagConstraints.ipady = 7;
         gridBagConstraints.insets = new java.awt.Insets(0, 0, 12, 0);
-        jPanel1.add(RyButton1, gridBagConstraints);
+        jPanel1.add(RyButton, gridBagConstraints);
 
-        jButton3.setText(bundle.getString("heightButton.text")); // NOI18N
-        jButton3.addActionListener(new java.awt.event.ActionListener() {
+        heightButton.setText(bundle.getString("heightButton.text")); // NOI18N
+        heightButton.addActionListener(new java.awt.event.ActionListener() {
             public void actionPerformed(java.awt.event.ActionEvent evt) {
-                jButton3ActionPerformed(evt);
+                heightButtonActionPerformed(evt);
             }
         });
         gridBagConstraints = new java.awt.GridBagConstraints();
         gridBagConstraints.gridy = 6;
         gridBagConstraints.ipady = 7;
         gridBagConstraints.insets = new java.awt.Insets(12, 0, 12, 0);
-        jPanel1.add(jButton3, gridBagConstraints);
+        jPanel1.add(heightButton, gridBagConstraints);
 
         jTabbedPane1.addTab("初期値入力", jPanel1);
 
 }//GEN-LAST:event_jMenuItem1ActionPerformed
 
 private void predictVolumePerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_predictVolumePerformed
-// TODO 間伐した後の材積変化グラフを出力する:
+//  間伐した後の材積変化グラフを出力する:
     ArrayList<Integer> ageList   = new ArrayList<Integer>();
     ArrayList<Integer> ratioList = new ArrayList<Integer>();
 
     volumeGraph.setVisible(true);
 }//GEN-LAST:event_predictVolumePerformed
 
-    private void growthButtonpredictVolumePerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_growthButtonpredictVolumePerformed
+    private void densityButtonpredictVolumePerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_densityButtonpredictVolumePerformed
         // TODO add your handling code here:
-    }//GEN-LAST:event_growthButtonpredictVolumePerformed
+        //  間伐した後の材積変化グラフを出力する:
+    ArrayList<Integer> ageList   = new ArrayList<Integer>();
+    ArrayList<Integer> ratioList = new ArrayList<Integer>();
 
-    private void RyButton1predictVolumePerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_RyButton1predictVolumePerformed
+    metaforest.setAge(Integer.valueOf(ageField.getText()).intValue());
+    metaforest.setHeight(Integer.valueOf(heightField.getText()).intValue());
+    metaforest.setDbh(Integer.valueOf(dbhField.getText()).intValue());
+    metaforest.setDensity(Integer.valueOf(densityField.getText()).intValue());
+    
+    if(!thinRatioField1.getText().equals("") && !thinAgeField1.getText().equals("")){
+        ageList.add(Integer.valueOf(thinAgeField1.getText()).intValue());
+        ratioList.add(Integer.valueOf(thinRatioField1.getText()).intValue());
+    }
+
+    if(!thinRatioField2.getText().equals("") && !thinAgeField2.getText().equals("")){
+       ageList.add(Integer.valueOf(thinAgeField2.getText()).intValue());
+        ratioList.add(Integer.valueOf(thinRatioField2.getText()).intValue());
+    }
+
+    if(!thinRatioField3.getText().equals("") && !thinAgeField3.getText().equals("")){
+        ageList.add(Integer.valueOf(thinAgeField3.getText()).intValue());
+        ratioList.add(Integer.valueOf(thinRatioField3.getText()).intValue());
+    }
+
+    if(!thinRatioField4.getText().equals("") && !thinAgeField4.getText().equals("")){
+        ageList.add(Integer.valueOf(thinAgeField4.getText()).intValue());
+        ratioList.add(Integer.valueOf(thinRatioField4.getText()).intValue());
+    }
+
+    if(!thinRatioField5.getText().equals("") && !thinAgeField5.getText().equals("")){
+        ageList.add(Integer.valueOf(thinAgeField5.getText()).intValue());
+        ratioList.add(Integer.valueOf(thinRatioField5.getText()).intValue());
+    }
+
+    //配列に変換
+    Integer[] ageArray = (Integer[])ageList.toArray(new Integer[0]); 
+    Integer[] ratioArray = (Integer[])ratioList.toArray(new Integer[0]); 
+
+    metaforest.setAgeArray(ageArray);
+    metaforest.setRatioArray(ratioArray);
+    
+    densityGraph = new DensityNumGraph(metaforest);
+    densityGraph.setVisible(true);
+    }//GEN-LAST:event_densityButtonpredictVolumePerformed
+
+    private void RyButtonpredictVolumePerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_RyButtonpredictVolumePerformed
         // TODO add your handling code here:
-    }//GEN-LAST:event_RyButton1predictVolumePerformed
+    }//GEN-LAST:event_RyButtonpredictVolumePerformed
 
     private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
         metaforest.setAge(Integer.valueOf(ageField.getText()).intValue());
         heightgraph.setVisible(true);
     }//GEN-LAST:event_jButton1ActionPerformed
 
-    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
+    private void heightButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_heightButtonActionPerformed
         // TODO add your handling code here:
         metaforest.setAge(Integer.valueOf(ageField.getText()).intValue());
         metaforest.setHeight(Integer.valueOf(heightField.getText()).intValue());
         heightgraph = new HeightGraph(metaforest);
         heightgraph.setVisible(true);
-    }//GEN-LAST:event_jButton3ActionPerformed
+    }//GEN-LAST:event_heightButtonActionPerformed
 
     /**
      * @param args the command line arguments
         });
     }
     // Variables declaration - do not modify//GEN-BEGIN:variables
-    private javax.swing.JButton RyButton1;
+    private javax.swing.JButton RyButton;
     private javax.swing.JTextField ageField;
     private javax.swing.JLabel ageLabel;
     private javax.swing.JTextField areaField;
     private javax.swing.JTextField densityField;
     private javax.swing.JLabel densityLabel;
     private javax.swing.JButton growthButton;
+    private javax.swing.JButton heightButton;
     private javax.swing.JTextField heightField;
     private javax.swing.JLabel heightLabel;
     private javax.swing.JButton jButton1;
     private javax.swing.JButton jButton2;
-    private javax.swing.JButton jButton3;
     private javax.swing.JMenu jMenu1;
     private javax.swing.JMenu jMenu2;
     private javax.swing.JMenu jMenu3;

File src/YaMaMon/main.properties

 HeightTable.text=\u6a39\u9ad8
 optTable.text=\u5099\u8003
 aboutLabel.text=<html>YaMaMon 0.0.1<br/> \u958b\u767a\u7248
-volumeButton.text=\u672c\u6570\u5bc6\u5ea6\u5909\u5316
+volumeButton.text=\u672c\u6570\u5bc6\u5ea6\u306e\u5909\u5316
 densityLabel.text=\u7acb\u6728\u5bc6\u5ea6(\u672c/ha)
 dbhLabel.text=\u5e73\u5747\u80f8\u9ad8\u76f4\u5f84(cm)
 RyButton.text=\u53ce\u91cf\u6bd4\u6570\u306e\u5909\u5316