This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
First, I have already searched the previous posts with no luck.
I am new to J2ME programming.
My program runs without errors on the blackberry "actual phone", as well as several other phone emulators.
My problem lies with receiving input from the trackball.
I've scoured the web trying to find information about this, and am only more confused.
I am trying to stay away from any RIM-specific API's so the game is more portable.
I found information stating I have to capture the input from the GameCanvas or Canvas "LEFT, RIGHT, UP, DOWN". There is also supposed to be a way to capture the trackball being pressed without the RIM-specific API's.
Can anyone give me a code snippet that basically shows how to do this working off of "javax.microedition.lcdui.game.GameCanvas;"?
I don't think a trackball is an expected standard control in J2ME. You may be stuck with using RIM-specific stuff. Of course, since a trackball can be represented as an HID device firing off a limited set of events, there might be a standard set of input events that it maps to. But to know for sure, I'd have to Google for it, and I wouldn't want to deprive you of the challenge of doing that yourself!
An IDE is no substitute for an Intelligent Developer.
Joined: Jan 10, 2010
"I've scoured the web trying to find information about this, and am only more confused."
I google'd for this for several hours actually. I found information that it "could" be done, but never any actual code listings.
I will probably go ahead and use the RIM API's. I figure I can design the program in both versions side-by-side in Netbeans for standard J2ME and eclipse for BB specifically, RIM decided support the Eclipse JDE over Netbeans for some reason.