question: private void randomizeStimulus ( ) { if ( randomLower >= randomUpper ) { JOptionPane . showMessageDialog ( null , "Upper and lower  values out of bounds." , "Warning" , JOptionPane . ERROR_MESSAGE ) ; return ; } stimulusPanel . removeAll ( ) ; for ( int i = 0 ; i < valArray . length ; i ++ ) { stimulusVals [ i ] = new JTextField ( "" + ( ( ( randomUpper - randomLower ) * Math . random ( ) ) + randomLower ) ) ; int lbl = i + 1 ; JLabel tmp = new JLabel ( lbl + ":" ) ; con . weightx = 0.3 ; con . gridx = 1 ; con . gridy = i + 1 ; stimulusPanel . add ( tmp , con ) ; con . weightx = 3 ; con . gridx = 2 ; con . gridy = i + 1 ; stimulusPanel . add ( stimulusVals [ i ] , con ) ; } stimulusPanel . updateUI ( ) ; }
target:  Randomizes numbers within text field array.