I posted the other day in Graphics and Therory forum and I don't think I phrased my question right. Maybe this is more of a beginners question anyways. I want to make a UI for a game. My game uses a game loop that calls update and render methods. So as of right now I am making a button class that implement MouseListener/ MouseMotionListener.
These buttons are very basic they have:
-Rectangle2D for the button its self
-they have a boolean called "hover" that is set to true if the mouse is contained in that Rectangle2D
-they have a render method to render it to the screen
There is a bit more code and I am simplifiing the process a bit, but am I on the right track or should I be doing something different.