View Single Post
Old 03-09-2009, 01:05 AM   #4
Ananthasivan V K
Thumbs Must Hurt
 
Join Date: Jan 2007
Location: Ernakulam, Kerala, India
Model: 8320
Carrier: Airtel
Posts: 65
Default

Quote:
Originally Posted by rachnakhokhar View Post
Hello Everyone,

I made an application in J2ME and now i want to run it on Blackberry also...I don't have much idea about blackberry but since blackberry's Research In Motion supports all j2me apis then i think by doing just minor changes i can make my j2me app run on blackberry also....

I would like to share the changes i made in my j2me app considering Blackberry.

1.Instead of Midlet class i made a class AppMain which extends UiApplication and starts the enterEventDispatcher() method.

2.Then i made an AppScreen which extends FullScreen and wrote all required methods.This is an abstract class.The abstract methods in this class are:-
---public abstract void init(int state);
---protected abstract boolean keyPressed(int keyCode, int gameAction);
---protected abstract void paintScreen(Graphics graphics);
And rest all my subclasses extends this AppScreen and there paintScreen() method is called in AppScreen's paint(Graphics graphics).

3. Then finally i used pushScreen() method with an instance of AppMain class which extends UiApplication to push that particular screen.

Everything is going perfect. Everything gets initialize properly and my application runs but don't know why the AppScreen class extending FullScreen paint method is not called.

I mean i have written SOP there but it's not going inside paint() method.

I hope i am clear enough and if not then please ask me i will make more clear.Please help with this problem. I am stuck with this from many days.

Thanks in advance for giving your precious time.

Regards
Rachna Khokhar | Software Engineer | Umundo Inc.
Hi Khokhar

Why don't you try with MainScreen ? I guess it'll work for the purpose, and why are you calling/overriding paint ? I think you must use subpaint for the stuff to work with FullScreen class.
__________________
Regards
Anand.
Offline   Reply With Quote