Hi all,
I have been playing with the basic game loop class from the tutorials section.
As part of my game’s GUI i want to be able to use forms to let the players controll the game.
For example, there will probably be a Shop or market screen that will let players buy and sell goods. I know how to make this as a jFrame form, but i’m unsure how to intergrate this with the actual game rendering prosess.
I have managed to get a jPanel form with lables and text boxes to render onto the game screen, but i cant get mouse events to pass to it (clicking buttons, dragging slideres etc)
Has anyone out there tryed this or got it to work? Is it even possible?
Thanks,
Matt
EDIT: Ok, I have a jPanel which shows the current date and time as a jLabel. It has a blue background, a border, and the opacity is set to true.
When I tell the component to paint during my render loop, it will ONLY show up if I use paintComponents(myGraphics);
This only paints the lable, not the background and border. If I use any of the other paint methods, nothing paints at all.
Whats going on here? 
// in my Game class constructor
public Game()
{
frame = new jFrame("My Game");
JPanel panel = (JPanel) frame.getContentPane();
panel.setLayout(null);
gui_topMenu = new GameGUI.TopMenu();
panel.add(gui_topMenu);
...
}
and…
// in my TopMenu class (extends jPanel)
public void render(Graphics2D g)
{
// I have tryed each of these (seperately)
this.paint(g); // this does nothing
this.paintComponent(g) // this also does nothing
this.paintComponents(g) // this only renders the controlls on the form, in this case the jLable
}
I must admit that I am still new to using the jFrame and jPanel classes 

