Background
In a database I have 2 columns, one a
string and one an integer. When my program runs it displays the text field held in the database as menu options and uses the integer column in order to use the setmnemonic function to highlight the required letter.
I order to maintain this table I have written a small form which allows the user to enter the text and integer values.
Problem.
I would like to modify my maintenance screen so that use user can enter the letter required for highligting (underling) as a character rather than an integer. If I do this I will need to convert the character entered into the ASCII value equivalent (A = 65 etc).
I think this can be done as :-
byte[] b = jTextFieldMnemonic.getText().getBytes();
int cb = b[0];
// cb is the ascii value of the character entered.
What has me a litte stumped is the way to do the opposite.
i.e. Take a integer, convert it to a string 1 character long
65 to "A" so that I can put it in the JTextfield on the screen.