All pastes #477308 Raw Edit

Someone

public java v1 · immutable
·published 2007-05-08 15:56 UTC
rendered paste body
class MyActionListener implements ActionListener {        // Process user's action in JTextField input        public void actionPerformed( ActionEvent e) {            String outputStr = "";                String numberStr = textfield1.getText();		int numb = 0;                if ((numberStr != null) && (numberStr.length()) > 0) {		    numb = Integer.parseInt(numberStr); 		}               if (( entryCount < MAX_NUMBERS ) && ( numb <= 300 ))  {                    dataValue[entryCount] = numb;                    entryCount++;                    textfield1.setText("");                    outputStr = "The array values: " + arrayToString(dataValue, entryCount);                    JOptionPane.showMessageDialog(null, outputStr, "Results",                                         JOptionPane.INFORMATION_MESSAGE);                            } else {                cannotAddFlag = true;            }                       displayData();        }    }