diff --git a/src/ListDialog/CultivarListDialog.java b/src/ListDialog/CultivarListDialog.java index 95dc262..d692884 100644 --- a/src/ListDialog/CultivarListDialog.java +++ b/src/ListDialog/CultivarListDialog.java @@ -199,7 +199,7 @@ private void AddDataToTable(Cultivar cul) { cbCrop.setVisible(false); jLabel1.setVisible(false); jLabel2.setVisible(false); - cbCultivar.setInit(null, "INGENO", cul != null ? cul.INGENO : "", CultivarList.GetAt(FileX.general.crop), new XColumn[]{new XColumn("CulName", "Cultivar Name", 200)}, "CropCode"); + cbCultivar.setInit(null, "INGENO", cul != null ? cul.INGENO : "", CultivarList.GetAt(FileX.general.crop), new XColumn[]{new XColumn("CulName", "Cultivar Name", 200)}, "CulCode"); this.setPreferredSize(new Dimension(this.getPreferredSize().width, 590)); EventQueue.invokeLater(() -> { diff --git a/src/xbuild/CultivarsFrame.java b/src/xbuild/CultivarsFrame.java index 11136f1..d53a372 100644 --- a/src/xbuild/CultivarsFrame.java +++ b/src/xbuild/CultivarsFrame.java @@ -132,7 +132,7 @@ public void mouseClicked(java.awt.event.MouseEvent evt) { private void jXTable1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jXTable1MouseClicked if (evt.getClickCount() == 2) { - int nRow = jXTable1.getSelectedRow(); + int nRow = jXTable1.getSelectedRow() + 1; Cultivar culEdit = (Cultivar) FileX.cultivars.GetAt(nRow); final CultivarListDialog dialog = new CultivarListDialog(null, culEdit, true);