diff --git a/src/gui/UI_LenheartUI/FightControl.java b/src/gui/UI_LenheartUI/FightControl.java index 6e3c36e..ec60ea1 100644 --- a/src/gui/UI_LenheartUI/FightControl.java +++ b/src/gui/UI_LenheartUI/FightControl.java @@ -59,6 +59,9 @@ public class FightControl extends JPanel { Buf.add(buffer); } Start.zlConfigs = Buf; + + String[] originalArray = this.textArea1.getText().split(","); // 按逗号切割成数组 + Start.shxs = originalArray; 特殊控制台.setTwConfig(); } @@ -75,8 +78,9 @@ public class FightControl extends JPanel { button25 = new JButton(); toggleButton3 = new JToggleButton(); label3 = new JLabel(); + label1 = new JLabel(); scrollPane2 = new JScrollPane(); - table2 = new JTable(); + textArea1 = new JTextArea(); //======== this ======== setLayout(null); @@ -137,29 +141,20 @@ public class FightControl extends JPanel { add(label3); label3.setBounds(125, 620, 185, 30); + //---- label1 ---- + label1.setText("\u4f24\u5bb3\u663e\u793a\u5355\u4f4d"); + add(label1); + label1.setBounds(new Rectangle(new Point(490, 10), label1.getPreferredSize())); + //======== scrollPane2 ======== { - //---- table2 ---- - table2.setModel(new DefaultTableModel( - new Object[][] { - }, - new String[] { - "\u6570\u5b57\u5355\u4f4d" - } - ) { - Class[] columnTypes = new Class[] { - String.class - }; - @Override - public Class getColumnClass(int columnIndex) { - return columnTypes[columnIndex]; - } - }); - scrollPane2.setViewportView(table2); + //---- textArea1 ---- + textArea1.setLineWrap(true); + scrollPane2.setViewportView(textArea1); } add(scrollPane2); - scrollPane2.setBounds(505, 10, 120, 595); + scrollPane2.setBounds(490, 35, 940, 110); { // compute preferred size @@ -200,7 +195,14 @@ public class FightControl extends JPanel { tableModel.addRow(rowData); }); - + + String XB = ""; + for (String shx : Start.shxs) { + XB += shx; + XB += ","; + } + XB = XB.substring(0, XB.length() - 1); + this.textArea1.setText(XB); } // JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables @formatter:off @@ -211,7 +213,8 @@ public class FightControl extends JPanel { private JButton button25; private JToggleButton toggleButton3; private JLabel label3; + private JLabel label1; private JScrollPane scrollPane2; - private JTable table2; + private JTextArea textArea1; // JFormDesigner - End of variables declaration //GEN-END:variables @formatter:on } diff --git a/src/gui/UI_LenheartUI/FightControl.jfd b/src/gui/UI_LenheartUI/FightControl.jfd index aea49c3..17f62c8 100644 --- a/src/gui/UI_LenheartUI/FightControl.jfd +++ b/src/gui/UI_LenheartUI/FightControl.jfd @@ -84,25 +84,24 @@ new FormModel { "x": 125 "y": 620 } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label1" + "text": "伤害显示单位" + }, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) { + "x": 490 + "y": 10 + } ) add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) { name: "scrollPane2" - add( new FormComponent( "javax.swing.JTable" ) { - name: "table2" - "model": new com.jformdesigner.model.SwingTableModel( new java.util.Vector, new java.util.Vector { - add( "数字单位" ) - }, new java.util.Vector { - add( class java.lang.String ) - }, new java.util.Vector { - add( null ) - }, new java.util.Vector { - add( null ) - } ) + add( new FormComponent( "javax.swing.JTextArea" ) { + name: "textArea1" + "lineWrap": true } ) }, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) { - "x": 505 - "y": 10 - "width": 120 - "height": 595 + "x": 490 + "y": 35 + "width": 940 + "height": 110 } ) }, new FormLayoutConstraints( null ) { "location": new java.awt.Point( 0, 0 )