Хочу вводить число в JTextArea и что бы оно выводилось на единицу больше. Нужно что бы это был именно int в промежутке между выводами.
public class PPANEL extends JPanel { public PPANEL() {setLayout(null); JTextArea txt = new JTextArea(); txt.setBounds(100, 30, 100, 20); add(txt); String txtdata = txt.getText(); int num = Integer.parseInt(txtdata)+1; JButton calc = new JButton("CALC"); calc.setBounds(100,100,100,20); add(calc); calc.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { txt.append(String.valueOf(txtdata)); } }); }