Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 22
Registered: ‎10-30-2008
My Device: Not Specified
Accepted Solution

setAcceptableDirections on MIDlets

Hi, 

 

Anybody was able to make setAcceptableDirections() work on a MIDlet to lock the screen to portrait mode on the Storm? Is it possible?

Developer
Posts: 22
Registered: ‎10-30-2008
My Device: Not Specified

Re: setAcceptableDirections on MIDlets

DirectionControl dirControl = (DirectionControl) javax.microedition.lcdui.Display.getDisplay(myMidlet); dirControl.setAcceptableScreenDirections(DirectionControl.DIRECTION_LANDSCAPE);

 

Found the solution.


 

New Developer
Posts: 8
Registered: ‎11-26-2008
My Device: Not Specified

Re: setAcceptableDirections on MIDlets

I tried implementing the setDirections bit in my project, I get the following error:

 

Uncaught exception java.lang.NoClassDefFoundError

 

I've included the following

import net.rim.device.api.system.Display;
import net.rim.device.api.lcdui.control.*;

 

And I have not included any additional jars in the project.  Additionally I'm delveopinga MIDlet based app and trying to integrate storm support. 

 

Any thoughts?

New Developer
Posts: 8
Registered: ‎11-26-2008
My Device: Not Specified

Re: setAcceptableDirections on MIDlets

Found my problem, I was including the wrong jde path (4.2.1 instead of 4.7.0) in the build.xml.

 

Regards