should I use Panels or not?

Ok quick question. If I have a world where I have a background and sprites moving around in it, and I wish to have an interface on the bottom of it with buttons what the best way of doing it? Right now I have a method that checks if a mouseClick happened within a certain area of the screen where my button is drawn, but is there a better way to make the interfaces? Note I wish to have my own buttons that I create a sprites. Is it better to use the awt or swing features like panels and components?

There is no reason to add awt/swing buttons to your game. Most games will want to turn the awt repainting off anyway for improved rendering, using your own buffers or the bufferstrategy.

Simply create your own button class that takes an image file and coordinates (rect) and give it basic button functionality like contains(x,y), and draw(g).

For even better effects pass in a mouseclick image and add mouseover effects as well as unique sound depending on the button type when clicked.

If you are going to be using a lot of your own custom buttons you should create a button manager that holds all the currently active buttons that have focus for easier mouse event testing.

There is no reason NOT to use Swing buttons. They provide you with optimized/minimal redraw, focus management, events etc. etc.

And changing the painting to use an own sprite is very easy.

In case you have MANY of them constantly moving around, overlapping … and so on, than don’t use JComponent. I tried it and it sucked bc. the redraw management is not made for that case.