Graphics 2d painting GUI HUD help

Hey JGO,
My first post, I hear this is the place to go for great advice and help!
Ok, so I’m developing a game currently(newb 2d game developer/game dev(non newb programmer I think)) and I decided I wanted an animated game instead of text and static images. So I looked into graphics 2d and got some animations going onto a game board. How do I go about adding a static GUI hud to that board to the game(RPG), what is the best way to add a GUI hud to a 2d game(User Panel buttons options health bar etc) .Any help is appreciated.

Still a bit confused with Graphics 2d though, most of my code is written for Characters(save file) combat, monster creation, just need to get over this hurdle, really all help is appreciated my head is kind of spinning experimenting with this…

Usually, the components in a game are built similar to the sprites, instead of using swing components. You would have them be drawn last, so they will be on-top of everything else.

So you’re saying I have to build components from scratch and if a mouse click in x area of painted object is present do x command, do action listeners still work? Or is there another way of doing so i’m open to all Ideas, thanks.

The idea of doing the component as a graphic element is to better integrate it into the environments. You can use Swing components if you find it easier.
The graphic component will need to implement some type of action listener. Are you listening for mouse events currently in your game? If so, on a mouse click, have the graphic component listen for the click, then it will check if the click occurred inside the component. Then the component will fire off an action as you would the swing component.

So what would be the first step to creating a component, like pretty much I want a diablo like looking GUI on the bottom of the game board, ability slots and such. I have an artist that can do the art for me but i’ve never worked with creating custom components, the plan was to paint a custom shelled JButton onto a painted HuD. I’m realy inexperienced with this matter and with graphics 2d.

Thanks,
Jay

What I have done, was I extends my sprite class (same class I used for characters on the screen), and added functionality to that (ComponentSprite). This has been discussed in the forum here http://www.java-gaming.org/topics/game-select-interface/21034/view.html

Interesting…also, would a glass pane work at all or no?

I could give you my 2D RPG (sprites,animation,maps,movement) files, there’s 3 of them.
Easily do what you’re asking.
IDK if ‘spoonfeeding’ is allowed here, but i’d be happy to give you my code to learn.

Would be a great learning experience, highly appreciate if you would share that with me, can you post or email?