Welcome to the Ranch.
I am afraid that is too large a question to answer in a posting; you will need to find the
Java Tutorial about databases, then download a MySQL connector.
You will have to look up tables in the
Java Tutorials, too, the work out which Component to add your table to.