Welcome to the Ranch.
I think a long time curled up with
the Java Tutorial about databases is going to help.
Suggest you learn to do database access from the command line, and once you have got it working, then you can probably transfer it to a JButton quite easily.