scaling graphic objects in slick2d

How to scale components on the frame by resolution? So, whenever I change screen size, for example, from 600/400, up to 1200/800, images, graphics, objects are also larger size?

  • I’ve found a method inside Graphic class, called, g.scale(sx,sy); , but I’m not really sure what type of x,y should I pass? Also, it seems to be really useful method, which will literally do all the job, matters to scaling, if im not wrong?

This might help You http://slick.ninjacave.com/javadoc/org/newdawn/slick/ScalableGame.html

Thanks for this, but is there any example on how to use this?
Also could someone give more solutions?

Here’s an example
http://foogamelib.googlecode.com/svn/trunk/FooGameLib/src/org/newdawn/slick/tests/ScalableTest.java

Ok, seems pretty easy, I just need to call instance, inside my main method… Btw, why are the objects so blurry ? Is there any way to fix it maybe, or that’s just how it is ?