@@ -0,0 +1,1137 @@
+package com.view.gui.panel;%0A%0Aimport com.view.gui.lib.SpringUtilities;%0A%0Aimport javax.swing.*;%0Aimport java.util.*;%0A%0A/**%0A * @author kamontat%0A * @version 1.0%0A * @since Mon 06/Mar/2017 - 6:52 PM%0A */%0Apublic class InputPanel extends JPanel %7B%0A%09private Map%3CString, JTextField%3E map;%0A%09%0A%09/**%0A%09 * @param header%0A%09 * %09%09the header of panel%0A%09 * @param labels%0A%09 * %09%09can't be same (should be unique)%0A%09 */%0A%09public InputPanel(String header, String... labels) %7B%0A%09%09map = new HashMap%3C%3E(labels.length);%0A%09%09%0A%09%09setLayout(new SpringLayout());%0A%09%09setHeader(header);%0A%09%09%0A%09%09for (String label : labels) %7B%0A%09%09%09JLabel l = new JLabel(label, SwingConstants.TRAILING);%0A%09%09%09add(l);%0A%09%09%09JTextField textField = new JTextField(10);%0A%09%09%09l.setLabelFor(textField);%0A%09%09%09add(textField);%0A%09%09%09%0A%09%09%09// save%0A%09%09%09map.put(label, textField);%0A%09%09%7D%0A%09%09%0A%09%09//Lay out the panel.%0A%09%09SpringUtilities.makeCompactGrid(this, labels.length + 1, 2, 6, 6, 6, 6);%0A%09%09%0A%09%09setOpaque(true);%0A%09%7D%0A%09%0A%09private void setHeader(String header) %7B%0A%09%09add(new JLabel(header, SwingConstants.LEADING));%0A%09%09add(new JLabel(%22%22));%0A%09%7D%0A%09%0A%09public void addActionListener(String key, Action action) %7B%0A%09%09map.get(key).addActionListener(action);%0A%09%7D%0A%7D%0A

add panel input in setting page