I have this code and in it there is a function to convert binary to decimal. It sets the text of a JTextArea to the result and appends the result to a different JTextArea. The former works fine but the latter causes the above mentioned exception to appear. This is my code below. Pls help. I have this code and in it there is a function