Hello all,
I am new to java and programming. You will be able to tell that by my post. I have a program that needs to take info from my textField and store it in an 2d array. Then do calculations and output the calculated data into a textArea. So far I can input,and store. Right now however I am just trying to print the stored data in my array in the textArea. (one step at a time)
my enter button sends it. my runReport button calculates and prints it. This is a swing() program using a GUI builder(netBeans)
I am not sure if I have given enough info to formulate a refrence fo me to look at but I hope someone out there figures out what I am talking about.(lol)
public class swing extends javax.swing.JFrame {
int r = 0;
double time;
double dollars;
double totalDollars;
double totalTime;
double aveWage = (totalTime/totalDollars)*60;
double [][] tutorInfo = new double [100][2];
/** Creates new form swing */
public swing() {
initComponents();
}
private void enterInfoActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
String tutorTime = timeInMinutes.getText();
time = Double.parseDouble(tutorTime);
timeInMinutes.setText("");
String tutorDollars = paymentInDollars.getText();
dollars = Double.parseDouble(tutorDollars);
paymentInDollars.setText("");
tutorInfo [r][0] = time;
tutorInfo [r][1] = dollars;
r++;
}
private void runReportActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:all of my compoutations go here
jTextArea1.setText("answer: " + tutorInfo[r][0]);
jTextArea1.setText("answer2: " + tutorInfo [r][1]);