Your grade averaging program needs to be split into methods that can be called from GUI. You add listeners to events in the GUI builder, events tell your program when the user did something such as click a button. You get data from some of your some of the graphics controls needed as inputs by your averaging program, call the method from your averaging program and use the results to set values of other graphical controls so the user can see the results.
For example to handle a button click, select the button, right click and choose Events -> Action -> actionPerformed from the popup menu and it will create a function that will be called when someone clicks the button and open the editor with the cursor inside that function.
So you get something like this.
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
and edit it to do something like this:
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// Get the inputs the user entered
int input1 = Integer.valueOf(jTextField1.getText());
int input2 = Integer.valueOf(jTextField2.getText());
// use your other class to do something
int result = new MyAverager().average(input1,input2);
// Display the result for a user.
jTextField3.setText(Integer.toString(result));
}