Problem with Java App running on OS X

Hello Everyone,
I am relatively new to Java and this website. I am working towards creating a 2D RPG game. I found a game engine from tutorials on Youtube. The game engine and it’s sample RPG and the mapmaker the programmer created run fine on my Windows 7 Desktop computer. The problem is with it running on my MacBook Air. When I run the app, a window opens with the app name in the title bar but the window is blank (just the standard gray background). The console shows the game running but it seems to not be displaying the title screen. I should say the mapmaker app runs the same way. So I’m thinking it has something to with OS X. Can anyone give me some pointers as to where to look or what to look for?

Thank you in advance!
Mark

Can you give links to it? Maybe I can test on my mac.

The Youtube channel is: baseball435 and here are the two links for the apps he has released: http://adf.ly/AV2PZ and http://adf.ly/AV2Xm . I am very interested to see what results you have.

Mark

Found the problem in both projects. The problem is that he is adding the components to the frame after making it visible. Changing that in [icode]Engine.Main[/icode] class fixed the problem. This is the same problem with the game as well.

For reference, here’s the changed main code.


frame.add(r);
Handler.setFrame(frame);

Thread run = new Thread(r);
run.start();

frame.setVisible(true);

Thank you SHC!

Why would it work on Windows? Wouldn’t this issue also be true for Windows?

What do you think of this game engine?

Thanks,
Mark

I actually doesn’t know why this is working on windows. However I remembered that I had to use [icode]revalidate()[/icode] method on a JFrame for a project at school to display newly added components. That’s it.

Okay. Thanks!

Mark