<3DIC's Profile User Rating: -----

Reputation: 6 Worker
Active Members
Active Posts:
327 (0.22 per day)
06-October 10
Profile Views:
Last Active:
User is offline Feb 11 2013 05:10 PM

Previous Fields

Who Cares
OS Preference:
Who Cares
Favorite Browser:
Who Cares
Favorite Processor:
Who Cares
Favorite Gaming Platform:
Who Cares
Your Car:
Who Cares
Dream Kudos:
Icon   <3DIC When i grow up want to be a pbl

Posts I've Made

  1. In Topic: Need help with two dimensional array

    Posted 30 Nov 2012

    Ok here is the implementation (part of)

    Attached File  Screen Shot 2012-11-30 at 8.51.03 PM.png (59.17K)
    Number of downloads: 5

    This doesn't seem to work, I entered time = 3 and earn = 6 then time = 4 and earn = 5 and it doesn't quite spit that back

    enterButton.addActionListener(new ActionListener() 
    			public void actionPerformed(ActionEvent e)
    				int row = 0;
    				// get user input, convert to a number and validate input
    				float time  = (Float) timeField.getValue();
    				float money = (Float) earningsField.getValue();
    				// write validated input to array
    				values[row][1]   = time;
    				values[row++][0] = money;
    				// clears the text fields to have visual confirmation that value have been moved into the array
    		} );
    		// this handles all reporting information
    		reportButton.addActionListener(new ActionListener() 
    			public void actionPerformed(ActionEvent e)
    				for(int i = 0; i < values.length; i++)
    						reportField.append("Minutes= " + Float.toString(values[i][0]) + "   Earnings= $" + Float.toString(values[i][1]) + "\n");
    		} );
  2. In Topic: Need help with two dimensional array

    Posted 30 Nov 2012

    View PostCasiOo, on 01 December 2012 - 03:11 AM, said:

    values[0][0] will be the time of the first row
    values[0][1] will be the earnings of the first row

    values[1][0] time of second row
    values[1][1] earning of second row


    Right, now how can I print that? I really can't see it. .
  3. In Topic: Need help with two dimensional array

    Posted 30 Nov 2012

    View Postmacosxnerd101, on 01 December 2012 - 03:21 AM, said:

    You should avoid using parallel arrays. Two-dimensional arrays should be used for grid data like mazes, not to relate values. Design a class here instead; it's much more appropriate and a better choice.

    I know that, unfortunately I am constrained to using a two-dimensional array.
  4. In Topic: How do I add a scroll pane to a text area

    Posted 30 Nov 2012

    That worked perfect, thank you!

My Information

Member Title:
D.I.C Regular
Age Unknown
Birthday Unknown

Contact Information



Page 1 of 1
  1. Photo

    <3DIC Icon

    13 Oct 2010 - 21:22
    Haha i thought it was slightly clever and hilarious! Thanks
  2. Photo

    NeoTifa Icon

    07 Oct 2010 - 16:38
Page 1 of 1