Java ME main class runs very well. It has a Form with CustomItem (Button like shape). When it is clicked keyPressed() is called in the CustomItem class. But I need to get information from the main class in the CustomItem class. As the main class is already run hence I can’t create new object of the main class in the CustomItem‘s keyPressed() method. How to get access to the main class’s element in the keyPressed() method?
Java ME main class runs very well. It has a Form with CustomItem (
Share
You can do one thing, just pass the object of main class with your next class constructor when you calling that class. You can use your main class object for any purpose. Just pass it with your next class constructor. If you dont understand post code here i will tell you.
Thanks