Java SE doesn't know about the insides of many types of files.
You will have to
either find a third party package that does know how to make the changes you want to make
or you will need to get documentation for the layout of the contents of the file and write code to add to or update the contents of the file. If you find out what the contents of the file are, then we can help you write the code to change the file.

Look at the Floating-Point Literals section.
I think a literal is what you are calling a constant.

What did Google give you?

Which of those 4 steps are you working on? Do one at a time: code it, compile and test it.
When it works move to the next one.
When you have problems and want help, post your questions here.

results[4][5] = i; // problem here nothing gets stored

How do you know? Is the statement executed? It's inside of an if statement.
Add a println immediately after that statement that prints out the value of results[4][5] and the value of i. Then you'll see what was stored in the array.

That doesn't look like valid java code. var is not part of java.

What happened if I omit the "f" at the end?

If it is java, compile and execute the program and see what happens.

I'm getting a few errors

You need to post the full text of any error messages that you need help with.

not sure how to continue

To see what is in the token array use the Arrays class's toString() method to format the array for output: System.out.println("an ID "+ java.util.Arrays.toString(theArrayName));
Replace "an ID" with a description of what is being printed.

What does the assignment say you need to do with the tokens that are in the array?

Read the API doc for the packages you are using.

Look at the prinf() method. It has formatting Strings that should help.

Also the String class's format() method could be useful.

Kronolynx commented: thanks +0

Pad the Strings in the first column with spaces so that they are all the same length.
say you want the first column to be 20 characters wide and the String to print is 15 chars long, then you need to add a String of 5 spaces to fill the first column to 20.
Make a method that takes the String and the width of the column and returns a new String with the input String padded with spaces to the width number of characters.

Use a modal dialog.

Why not use a loop to copy an element from each array into the target array?
Define the target 2D array and copy to elements 0 and 1

a(which is 1)

Can you explain what you mean here? Are you talking about the char value: 'a' or what?
Or are you talking about an int variable named a: int a = 1;
Your discussions are very ambiguous and impossible to follow unless you define the terms you are using.

wants it to have values a=1 b=2 c=3.

To make f('a') = 1 do this: subtract 'a' and add 1
'a' - 'a' + 1 = 1
'b' - 'a' + 1 = 2
etc

Are you confusing the hexidecimal values of hex digits with the values of chars?
The hex digit A represents the int value 10, B is 11 etc through F = 15

The int value of 'A' is 65

Comments:
The code is poorly formatted
If key is a String, why do this: key.toString() use key directly
What does this mean: subtracts 9 to make unicode into values A,B,C...=1,2,3...
'A' - 9 = 56 not 1

The class won't compile?!

Please post the full text of the error messages.

Can you post what the csv file would look like given the XML you posted for input?

Events like key presses don't work that way. You need to use a listener that is called when the event happens. The code should show a window with a button and then exit to the jvm to await the user pressing the button. When the button is pressed, the event listener is called.

If you want to pause the execution of a method, you might be able to use something like the wait() notify() methods. Call wait() in at the place you want to pause execution and call notify() for that wait() in the listener method.

do some action only when enter is pressed

Put the code in the listener that is called when Enter is pressed.

What code have you written so far? Do you have any specific problems or questions to ask about it?
Post your code and your questions so we can help you get your code to work.

Add just one println statement inside the draw() method (after line 25) that prints the values of all the variables used in the draw() method.

Try debugging the code by printing the values of the variables used in the draw() method to see where the fillRect() method is drawing.

There should NOT be code in the paint method to set background and size in the paint() method.

Try debugging the code by printing out the values of all the variables used in the draw() method to see where the fillRect() method is doing its thing.

We cross posted. See my last post.

BTW Menu is the name of a class in the Java SE java.awt package. It's confusing to use that name for your class

Did you read this:
http://www.daniweb.com/software-development/java/threads/430890/actionlistener-causing-keybindings-to-fail#post1846783

Try this:
getInputMap(WHEN_IN_FOCUSED_WINDOW).put( KeyStroke.getKeyStroke( "RIGHT" ), "doRightAction" );

Please post the code here vs a link.

Can you make a small program that compile, executes and shows the problem?

We cross posted. See my last post.

Please post the full text of the error message that shows where the error occurs.
What statement causes the exception?

method whose result type is void?

The posted method is defined with return type of void on line 1. It can not return a value on line 12.
Change its return type to be the same type as total if you want to return a value.

BTW total won't be an accumulation of values, it will hold the last value received in line 7