Using jbutton to write to jtextfield values to database

Hi, i'm trying to write a GUI which can write text from a JTextfield to a MySQL database when the user clicks a jbutton. I'm having errors with the eventhandler code for the button, can anyone take a look at my code for me and explain to me what i'm doing wrong:

I'm really sorry that i've just pasted my code, i'm not aware of how to display it in the right format

asdf andf wrote: I'm really sorry that i've just pasted my code, i'm not aware of how to display it in the right format

You'll find the answer to that and many other tips here: How To Ask Questions On Java Ranch. I've added the code tags for you, but it doesn't really help as your code lacks indentation. You might like to edit the post and replace that with properly formatted code copied directly from your source editor.