Every time I create a JButton with an image constructed to it, it sets the JButton's size to a size slightly larger than the Image's size. I tried to use button.setBounds(x,y,width,height), and then repainted the button after this, but it did not do anything. I want to set the JButton to the exact size of the image, not slightly larger than it, and I also want to move the JButton down to the bottom of the screen. Both of these are attainable through setBounds but it does not do anything on a pre-constructed JButton with an image. What's your suggestion? Thank you for your time.
Try:
setMargin(new Insets(0,0,0,0));