   Java Game Programming
  I am planning to write a browser game in Java, into a Game Engine (something like a flash game), but I am wondering which one to use.I want a 2D one as simple as possible with gravity and collusion detection.How I am planning my game is just the player with a bow shooting the enemy.(classical action flash game)This is not the simplest thing possible but I am quite experienced in game programming in DirectX so I think I will find no much difficulties.Which engine fits my needs?   
  Using Java2D shouldn't be any issue.  Simulating gravity and getting around silly timing issues shouldn't be too hard.The hardest part will be figuring out the contorted rendering classes/interconnections that Java has  and the Math if you've never done it before.   ;  Here's a pretty good article you may want to check out: http://www.gamedev.net/reference/programming/features/javarender/   ;  I have some very primitive Java games here and you can see the source code.If your game is very simple you might as well just write it using the Java standard library.I use Java Graphics\Java2D.Its braindead simple and the performance on Windows is fine. You might want to test on OS X in case of differing bugs or performance considerations; Apple produces their own JVM implementation and the graphics performance is not as good. Layout bugs and undefined behaviours differ. Write once test everywhere as they say.Given a component or a frame, you can override the paint(Graphics g) method.The Graphics object provides methods for painting and everything.You can also reference it as a Graphics 2D object (e.g. "Graphics2D g2d = (Graphics2D) g;") which provides extra functionality.You can also use the getGraphics() method on components to get a graphics object that paints to a given component.If you want full control over when painting occurs, you can use the setIgnoreRepaint(boolean) method to disable painting on an object, then perform painting at your leisure.Bare in mind that AWT & Swing are not thread safe so you need to perform painting from the event dispatch thread.There is a timer (javax.swing.Timer) that can make repeated calls in this thread, and you also have methods like SwingUtilities.invokeLater(Runnable) and .invokeNow that let you launch code in the event dispatch thread from other threads. Use .invokeLater to launch your app from the Main thread rather than issuing any GUI calls in the main thread.Also check out BufferedImage, the clock methods in the System class and look up double buffering and volatile image.That's the heart of it.   ;  You should also take a look at Slick2D for rendering and JBox2D for physics and collision detection.   ;  All of these anwsers were very very helpful.Thank you all.This has made my work much easier   