Scrolling Background & a Graphics Question (HELP!!)

I am using a game engine "gameframe" which can be downloaded from www.gamedev.net/hosted/javanerd

i wanted to know how can i create a moving backgrond like the background moves left or right if we move the character left or right respectively. If anyone is using the same engine please help me with demo coding.

Another question is that how can i draw graphics in a Frame like how can i add the applet graphics to a Frame. For example (if u are'nt getting wat i mean) we add a JPanel to a JFrame like this:

JFrame j;

JPanel a;

j.add(a);

So how we add the graphics to it. Hope u understand wat i mean, sorry for the inconvienience i put u thru while trying to explain my problem. please help me ASAP. I will very thankful.

[765 byte] By [alimanpagal] at [2007-9-27 19:33:37]
# 1
You probably want to post at the java forum on gamedev.net, I think javanerd runs the forum so he might be able to answer your question
Erik_N at 2007-7-6 22:36:20 > top of Java-index,Other Topics,Java Game Development...
# 2

Regarding ur doubt about adding graphics;since JPanel is a component,

u can override the Component class' paint method while passing a graphics context as argument,and call repaint() for the Panel's object.

public void paint(Graphics g)

{

//code for drawing.

}

For swing GUI the JPanel will act as the canvas for drawing.so u can do the painting directly on JPanel.

aditya_26781 at 2007-7-6 22:36:20 > top of Java-index,Other Topics,Java Game Development...