Button class, image or graphics?

I’m creating a button class in Slick2D library for game development. So I want to instead of using three images for a button like contains, pressed and down, to use graphics to draw a rectangle and add to it many other graphic features, and what takes more memory ?

Both use so little memory that this factor should be irrelevant when making your decision.

Also, memory is not a problem most of the time, cpu / gpu cycles is whats never enough, drawing an simple image seems much faster then drawing every graphical feature with code.

If you’re that worried about memory usage, use a texture atlas.

fyi, texture atlases are for improving texture binding speed, not saving memory.

Nah, I was just curious… :smiley:
Thank you guys on replys.