you would use parseInt to get a String to an int. The problem is that you are trying to assign a single int as an int array. What you would have to do instead is somthing like
CODE
int priarray = Integer.parseInt(prif);
which assigns the passes int to an int, not an int array. after this you can add it to an array.
The approach i would take to sort out your other problem would be to create a new class called Jobs or somthing, where you can instantiate a Jobs Object;
SO somthing like
CODE
public class Jobs{
private String job;
private String priority;
private String burstTime;
public Jobs(String job, String priority, String burstTime)
{
this.job=job;
this.priority=priority;
this.burstTime=burstTime;
}
.....
This way, in your gui you can create an array of Jobs by creating an instance of the class
Jobs[] myJobs = new Jobs[3];
then provide a loop or somthing, and add the Objects to your array
CODE
for(int i = 0; i < myJobs.length; i++) //loop the array
{
myJobs[i] = new Jobs(//what ever the name of your input variables are); //and assign it with the data
}
This way, you can get them into an array of your own specified type.
have fun working on this. P.s, code of the top of my head, maybe some mistakes
This post has been edited by nick2price: 1 Jan, 2009 - 06:39 PM