hi.. uuhhmm..
i have a problem in how to put an String Buffer method here in my code.. uuhhmm.. i just want to know the easiest way of putting a String buffer .. please help . . thanks..
import java.awt.Graphics;
import java.util.Random;
import javax.swing.*;
public class Change {
public static void main (String[]args) {
String m1, m2, m3, m4, m5, m6, m7, m8, asa, m0, naman, temp="";
int x, a;
Foo foo = new Foo();
foo.main(null);
}
static class Foo{
public static void main (String[]args){
String m1, m2, m3, m4, m5, m6, m7, m8, asa, m0, naman, temp="";
int x, a, m13;
String[] m9= new String[10];
String[] m10= new String[10];
int[] m11= new int[10];
int[] m12= new int[10];
do{
m1 = JOptionPane.showInputDialog("Student Name:");
m2 = JOptionPane.showInputDialog("Student ID:");
m3 = JOptionPane.showInputDialog("Tuition Fee:");
m0 = JOptionPane.showInputDialog("Numbers of Student Enrolled:");
a = Integer.parseInt(m0);
for(x=0; x<a; x++)
{
m5 = JOptionPane.showInputDialog("Course Code:");
m6 = JOptionPane.showInputDialog("Course Name:");
m7 = JOptionPane.showInputDialog("Credit Hours:");
m8 = JOptionPane.showInputDialog("Course GRADE:");
m13 = Integer.parseInt(m7);
}
JOptionPane.showMessageDialog(null,temp,"TITLE",JOptionPane.PLAIN_MESSAGE);
asa = JOptionPane.showInputDialog("try again? [Y/N] ...");
}while (asa.charAt(0)=='Y'|| asa.charAt(0)=='y');
do{
m1 = JOptionPane.showInputDialog("Student Name:");
m2 = JOptionPane.showInputDialog("Student ID:");
m3 = JOptionPane.showInputDialog("Tuition Fee:");
m0 = JOptionPane.showInputDialog("Numbers of Student Enrolled:");
a = Integer.parseInt(m0);
for(x=0; x<a; x++)
{
m5 = JOptionPane.showInputDialog("Course Code:");
m6 = JOptionPane.showInputDialog("Course Name:");
m7 = JOptionPane.showInputDialog("Credit Hours:");
m8 = JOptionPane.showInputDialog("Course GRADE:");
}
JOptionPane.showMessageDialog(null,temp,"TITLE",JOptionPane.PLAIN_MESSAGE);
asa = JOptionPane.showInputDialog("try again? [Y/N] ...");
}while (asa.charAt(0)=='Y'|| asa.charAt(0)=='y');
}
}
}