Hi,
I have checked examples and tutorials but never seem to get a direct answer to a couple of questions. When using a Gui with a JButton (Netbeans)where does the code for the array go in order to be displayed? Here is the code for the array and I just want to click the button and have it display. Where do I put it?(the code) This website has been extremely helpful to me as perhaps I am a slow learner and prefer not to copy and paste but I really want to learn the logic behind the code. Thanks in advance for any help. I do not need help with making the JButton but I do need help in having this display after pressing the button.
lynnajoe
int [] aryNums = new int [6];
aryNums [0] = 10;
aryNums [1] = 5;
aryNums [2] = 6;
aryNums [3] = 9;
aryNums [4] = 7;
aryNums [5] = 3;
Arrays.sort(aryNums);
int i;
for (i =0; i <aryNums.length;i++) {
System.out.println("number: " + aryNums[i]);
}
}