Hi so i tried using if statements to set my rNum variable and it never changes from 0? any ideas?
public void readStartFile(String fileName){
int rNum=0;
int cNum=0;
...
Type: Posts; User: why_always_me
Hi so i tried using if statements to set my rNum variable and it never changes from 0? any ideas?
public void readStartFile(String fileName){
int rNum=0;
int cNum=0;
...
Hi I have now found out how to use the split method correctly. here is my piece of code used for an example as you suggested.
public class SplitExample{
public static void main(String...
managed to get jdk 7 working now. still slightly confused by the split() method though. is there any easier way of detecting the R,C and colour?
thanks
sorry i am not too sure :(. Can not get any code to compile on my laptop at the minute after trying to install jdk 7. no matter what program i try and run i just get the error could not find or load...
i removed the bottom line strLine.removeCharAt(strLine[0]);
and it compiles fine.
ok so it should be something like
while ((strLine = br.readLine()) != null) {
strLine.split(" ");
strLine.removeCharAt(strLine[0]);
}
ok thanks. so would that mean i would do something like
while ((strLine = br.readLine()) != null) {
strLine.split(" ");
strLine = strLine.substring(0,...
Hi I will be determining the correct square by trying to parse the row and column info from the file as well as the colour and then using
buttons[row][col].setBackground(colour)
where row...
Hi I have managed to get the colouring in part to work :) but i am now confused on how to do the file reading. below is the new code that colours squares and SHOULD fill some in from the start. the...
Hi ok thanks for that. I have now managed to get the squares to change colour. How will i now make them go back to default if they are clicked and they have been coloured in? thanks
here is the...
Hi this is my first post here.
basically i want a programme to do teh following:
1)create a 6x6 grid.
2)ask the user to choose from 6 colours to fill a square
3)test to see if one row or...