<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-537260250674612086</id><updated>2012-02-16T20:38:27.452+06:00</updated><title type='text'>BlackBerry Tricks and Tips and Codes</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blackberry-tips-bikas.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Bikas</name><uri>http://www.blogger.com/profile/12419623956407586096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_AOJV3rdHrNA/TOZZ9POdctI/AAAAAAAAAA4/dDYeLz72-Do/S220/S7304974.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>22</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-537260250674612086.post-7238070528889845022</id><published>2010-02-16T18:06:00.000+06:00</published><updated>2010-02-16T18:12:14.139+06:00</updated><title type='text'>How to create library jar file and use that jar in another project</title><content type='html'>Sometimes we use some codes/classes redundantly in many application without any changes in the code.&lt;br /&gt;In such type of cases its better to create a jar file with those classes and use only the jar file on other projects.&lt;br /&gt;For exmaple, if we have some classes with custom UI , then we can create a jar file with the classes rather adding all the classes in other projects repeatdely also in those case we have to change the packge name based on the directory.&lt;br /&gt;&lt;br /&gt;First , How to Create the Jar file&lt;br /&gt;-------------------------------&lt;br /&gt;1. Create a new workspace (for example lib.jdw)&lt;br /&gt;2. Create a new project(for example lib.jdp) under lib.jdw&lt;br /&gt;3. Add the classes you want to create jar.&lt;br /&gt;4. Note that no main is reqired.&lt;br /&gt;5. From project properties make the project as library.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;i&gt;Right Click on the Project -&amp;gt; Properties.. -&amp;gt; Application Tab -&amp;gt; Select Project type as Library&lt;/i&gt;&lt;br /&gt;6. Build the project&lt;br /&gt;7. Now you should have a jar file named &lt;b&gt;lib.jar&lt;/b&gt; in the project file directory.&lt;br /&gt;8. Preverify the jar file &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; a. &lt;i&gt;Go to your JDE installation folder (C:\Program Files\Research In Motion\BlackBerry JDE&amp;nbsp;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.6.0\bin)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; b. Copy lib.jar file to bin folder.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c. Now open your command prompt and change your current directory to your JDE installation&amp;nbsp;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; directory.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; d. Now execute the following command:&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;b&gt;preverify -classpath "C:\Program Files\Research In Motion\BlackBerry JDE 4.6.0\lib&amp;nbsp;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; \net_rim_api.jar"&amp;nbsp; "lib.jar"&lt;/b&gt;&lt;/i&gt; &lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; e. In your bin directory(C:\Program Files\Research In Motion\BlackBerry JDE 4.6.0\bin) a folder&amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; named output will create.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; f. Preverified jar file resides here.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;9. Now rename lib.jar as lib.zip and delete cod , csl , cso file from there&lt;br /&gt;10. Rename it back to lib.jar (make sure cod,csl,cso has been deleted)&lt;br /&gt;11. Now you have got the jar file that you can reuse.&lt;br /&gt;&lt;br /&gt;Second, How to add this jar to other project&lt;br /&gt;--------------------------------------------&lt;br /&gt;1. For example, yow want to add this jar from another project (different workspace) app.jdp.&lt;br /&gt;&lt;i&gt; &lt;/i&gt;&lt;br /&gt;2. Import the jar file from the project app.jdp&lt;i&gt;&amp;nbsp;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Right Click on the Project -&amp;gt; Properties.. -&amp;gt; Build Tab -&amp;gt; Add lib.jar as Imported Jar&amp;nbsp;&amp;nbsp;&amp;nbsp; files:&lt;/i&gt;&lt;br /&gt;3. Now you will be able to import the classed of lib into the new project app.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Bikas&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/537260250674612086-7238070528889845022?l=blackberry-tips-bikas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blackberry-tips-bikas.blogspot.com/feeds/7238070528889845022/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2010/02/how-to-create-library-jar-file-and-use.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/7238070528889845022'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/7238070528889845022'/><link rel='alternate' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2010/02/how-to-create-library-jar-file-and-use.html' title='How to create library jar file and use that jar in another project'/><author><name>Bikas</name><uri>http://www.blogger.com/profile/12419623956407586096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_AOJV3rdHrNA/TOZZ9POdctI/AAAAAAAAAA4/dDYeLz72-Do/S220/S7304974.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-537260250674612086.post-4863192557946685079</id><published>2010-01-09T16:12:00.000+06:00</published><updated>2010-01-09T16:12:38.615+06:00</updated><title type='text'>How to Deploy any Application on Real Blackberry Devices</title><content type='html'>First of all the following files are required to install an application into real device.&lt;br /&gt;&amp;nbsp; a. appName.cod (appName1.cod, appName2.cod, ...)&lt;br /&gt;&amp;nbsp; b. appName.jad&lt;br /&gt;&amp;nbsp; c. appName.alx&lt;br /&gt;&amp;nbsp; d. .htaccess (required for OTA)&lt;br /&gt;&lt;br /&gt;An application can be intalled in the real device in two ways.&lt;br /&gt;&amp;nbsp; a. OTA (Over The Air)&lt;br /&gt;&amp;nbsp; b. Connecting your device with the PC&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; b1. Using Javaloader&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b2. Using Desktop Manager&lt;br /&gt;&lt;br /&gt;&lt;b&gt;OTA Installation Process&lt;/b&gt;&lt;br /&gt;----------------------------&lt;br /&gt;Check this &lt;a href="http://blackberry-tips-bikas.blogspot.com/2009/08/ota-installtion.html"&gt;link&lt;/a&gt;.&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&lt;b&gt;Connecting your device with the PC&lt;/b&gt;&lt;br /&gt;--------------------------------------------------&lt;wbr&gt;&lt;/wbr&gt;-------&lt;br /&gt;1. First Connect your device through USB.&lt;br /&gt;2. Sign the cod file if required&lt;br /&gt;3. Then you can install your application in the following ways:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; a. Using javaloader:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i. Goto the JDE bin directory(ex: C:\Program Files\Research In Motion\BlackBerry JDE 4.6.0\bin\).&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ii. copy your cod and jad file there.&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; iii. execute the following command from there (you can create a batch file (*.bat) and just click will do )&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;i&gt;&amp;nbsp; &lt;/i&gt;&lt;/b&gt;&lt;i&gt;&lt;strong&gt;javaloader -usb load applicationName.jad&lt;/strong&gt;&lt;/i&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&lt;/i&gt;&lt;/b&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; or&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;i&gt; &lt;strong&gt;javaloader -usb load applicationName.cod&lt;/strong&gt;&lt;/i&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; b. Using Desktop Manager:&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i.&amp;nbsp; Install destop manager&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ii. place *.alx and *.cod&amp;nbsp; file in the same directory&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iii.select your *.alx file from desktop manager.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iv.Then it should start installing the application in the device.&lt;br /&gt;&lt;br /&gt;Also check out these &lt;a href="http://na.blackberry.com/eng/developers/resources/videolibrary.jsp#tab_tab_deployment"&gt;videos&lt;/a&gt; from Developer Video Library.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/537260250674612086-4863192557946685079?l=blackberry-tips-bikas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blackberry-tips-bikas.blogspot.com/feeds/4863192557946685079/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2010/01/how-to-deploy-any-application-on-real.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/4863192557946685079'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/4863192557946685079'/><link rel='alternate' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2010/01/how-to-deploy-any-application-on-real.html' title='How to Deploy any Application on Real Blackberry Devices'/><author><name>Bikas</name><uri>http://www.blogger.com/profile/12419623956407586096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_AOJV3rdHrNA/TOZZ9POdctI/AAAAAAAAAA4/dDYeLz72-Do/S220/S7304974.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-537260250674612086.post-5502388367253323923</id><published>2009-08-30T13:29:00.000+07:00</published><updated>2009-08-30T15:45:07.929+07:00</updated><title type='text'>Code Signing</title><content type='html'>Quote from Knowbedge Article about code Signing:&lt;br /&gt;&lt;pre&gt;"Research In Motion (RIM) must track the use of sensitive application programming interfaces (APIs) in the&lt;br /&gt;BlackBerry JDE for security and export control reasons. In the API reference documentation, sensitive classes or&lt;br /&gt;methods are indicated by a lock icon or are noted as signed. If you use these controlled classes or methods in your&lt;br /&gt;applications, your application must be signed with a key or a signature provided by RIM before you can load the&lt;br /&gt;application .cod files onto the BlackBerry smartphone."&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;For Buying Code signing keys &lt;b&gt;&lt;a href="http://na.blackberry.com/eng/developers/javaappdev/codekeys.jsp"&gt;Go Here&lt;/a&gt;&lt;/b&gt;. You have to spend 20 USD to buy the key.&lt;/pre&gt;&lt;br /&gt;Some Other Reference link from KB Article.&lt;br /&gt;&lt;pre&gt;&lt;a href="http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800989/What_Is_-_Code_signing_and_obtaining_signature_keys.html?nodeid=800749&amp;amp;vernum=0"&gt;What Is - Code signing and obtaining signature keys&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/8067/645045/8655/8656/1381328/BlackBerry_Signature_Tool_Developer_Guide.pdf?nodeid=1381553&amp;amp;vernum=0"&gt;Register Signing Keys&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800989/How_To_-_Sign_a_.cod_file?nodeid=1366820&amp;amp;vernum=0"&gt;How To - sign a .cod file&lt;/a&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;Also Have a look at this &lt;a href="http://developerlife.com/tutorials/?p=522"&gt;Article&lt;/a&gt;. Here signing steps explained clearly. &lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;Once you have the key you can sign as many application as you want.&lt;br /&gt;And just in case if you lost the keys RIM resend you the keys to your mail address by disabling your previous keys. For that you have to send a mail to &lt;b&gt;devsupport@rim.com&lt;/b&gt; requesting the keys and regarding your issue about key lost. The normally respond within 2-3 business days.&lt;br /&gt;&lt;br /&gt;Legally you cannot use the keys more than one PC.&lt;br /&gt;But Practically you can use the keys in any PC. For this:&lt;br /&gt;&lt;pre&gt;a. Preserve the following files:&lt;br /&gt;i.   sigtool.db&lt;br /&gt;ii.  sigtool.csk&lt;br /&gt;iii. sigtool.set&lt;br /&gt;b. Copy these files in the JDE bin directory. (ex: C:\Program Files\Research In Motion\BlackBerry JDE 4.3.0\bin)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/537260250674612086-5502388367253323923?l=blackberry-tips-bikas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blackberry-tips-bikas.blogspot.com/feeds/5502388367253323923/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2009/08/code-signing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/5502388367253323923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/5502388367253323923'/><link rel='alternate' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2009/08/code-signing.html' title='Code Signing'/><author><name>Bikas</name><uri>http://www.blogger.com/profile/12419623956407586096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_AOJV3rdHrNA/TOZZ9POdctI/AAAAAAAAAA4/dDYeLz72-Do/S220/S7304974.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-537260250674612086.post-3710684741268139584</id><published>2009-08-30T13:04:00.000+07:00</published><updated>2009-08-30T13:08:30.458+07:00</updated><title type='text'>Clickable BitmapField</title><content type='html'>&lt;br /&gt;&lt;br /&gt;For making BitmapField clickable&lt;br /&gt;------------------------------------------------&lt;br /&gt;&lt;table border = "1"&gt;&lt;tr&gt;&lt;td&gt;&lt;pre&gt;&lt;br /&gt;         Bitmap image = Bitmap.createBitmapFromResource("button.png");&lt;br /&gt;         BitmapField  imageButton = new BitmapField(image, BitmapField.FOCUSABLE)&lt;br /&gt;         {&lt;br /&gt;                    private XYRect xyrect=new XYRect();&lt;br /&gt;                    protected boolean navigationClick(int status, int time) &lt;br /&gt;                    {&lt;br /&gt;                            // This is method will invoke after clicking the image&lt;br /&gt;                            // System.out.println("Image Clicked");&lt;br /&gt;                            return true;&lt;br /&gt;                     }&lt;br /&gt;        };&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt; &lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/537260250674612086-3710684741268139584?l=blackberry-tips-bikas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blackberry-tips-bikas.blogspot.com/feeds/3710684741268139584/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2009/08/clickable-bitmapfield.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/3710684741268139584'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/3710684741268139584'/><link rel='alternate' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2009/08/clickable-bitmapfield.html' title='Clickable BitmapField'/><author><name>Bikas</name><uri>http://www.blogger.com/profile/12419623956407586096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_AOJV3rdHrNA/TOZZ9POdctI/AAAAAAAAAA4/dDYeLz72-Do/S220/S7304974.JPG'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-537260250674612086.post-3248807371034360545</id><published>2009-08-30T12:53:00.000+07:00</published><updated>2009-08-30T13:01:26.260+07:00</updated><title type='text'>Align Field in Center</title><content type='html'>&lt;br /&gt;&lt;br /&gt;For aligning ButtonField in a HorizontalFieldManager&lt;br /&gt;---------------------------------------------------------------------------&lt;br /&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;pre&gt;&lt;br /&gt;           HorizontalFieldManager hfm = new HorizontalFieldManager(HorizontalFieldManager.FIELD_HCENTER);&lt;br /&gt;           ButtonField  button = new ButtonField("Button",DrawStyle.HCENTER); &lt;br /&gt;           hfm.add(button);&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;For aligning LabelFIeld Center&lt;br /&gt;---------------------------------------------------------------------------&lt;br /&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;pre&gt;&lt;br /&gt;           LabelField labelField = new LabelField("Center Label", LabelField.USE_ALL_WIDTH | DrawStyle.HCENTER);&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/537260250674612086-3248807371034360545?l=blackberry-tips-bikas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blackberry-tips-bikas.blogspot.com/feeds/3248807371034360545/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2009/08/align-buttonfield-ceneter-in.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/3248807371034360545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/3248807371034360545'/><link rel='alternate' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2009/08/align-buttonfield-ceneter-in.html' title='Align Field in Center'/><author><name>Bikas</name><uri>http://www.blogger.com/profile/12419623956407586096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_AOJV3rdHrNA/TOZZ9POdctI/AAAAAAAAAA4/dDYeLz72-Do/S220/S7304974.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-537260250674612086.post-3994479367655820834</id><published>2009-08-30T12:39:00.001+07:00</published><updated>2009-08-30T12:48:48.588+07:00</updated><title type='text'>Drawing a Circle</title><content type='html'>&lt;br /&gt;&lt;br /&gt;There is no direct api in the graphics class to draw circle.&lt;br /&gt;So for creating circle have to use eclipse or arc.&lt;br /&gt;&lt;br /&gt;Circle Property&lt;br /&gt;---------------------&lt;br /&gt;1. Center point of the circle (x, y)&lt;br /&gt;2. Radius r&lt;br /&gt;&lt;br /&gt;Now circle can be drawn in the following ways&lt;br /&gt;------------------------------------------------------------------&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;Graphics.drawEclipse(x, y, x + r, y, x, y + r, 0, 360);&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;Graphics.fillArc(x, y, r, r, 0, 360);&lt;br /&gt;Graphics.drawArc(x, y, r, r, 0, 360);&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/537260250674612086-3994479367655820834?l=blackberry-tips-bikas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blackberry-tips-bikas.blogspot.com/feeds/3994479367655820834/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2009/08/drawing-circle.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/3994479367655820834'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/3994479367655820834'/><link rel='alternate' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2009/08/drawing-circle.html' title='Drawing a Circle'/><author><name>Bikas</name><uri>http://www.blogger.com/profile/12419623956407586096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_AOJV3rdHrNA/TOZZ9POdctI/AAAAAAAAAA4/dDYeLz72-Do/S220/S7304974.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-537260250674612086.post-756975105368911239</id><published>2009-08-30T00:37:00.000+07:00</published><updated>2009-08-30T00:42:33.707+07:00</updated><title type='text'>Clickable LabelField act like Link (Href Field )</title><content type='html'>&lt;p&gt;&lt;/p&gt;&lt;br /&gt;The example of a LabelField which act like html link.&lt;br /&gt;&lt;table border="1"&gt;&lt;tr&gt;&lt;td&gt;&lt;pre&gt;&lt;br /&gt;import net.rim.device.api.ui.Field;&lt;br /&gt;import net.rim.device.api.ui.Font;&lt;br /&gt;import net.rim.device.api.ui.FontFamily;&lt;br /&gt;import net.rim.device.api.ui.Graphics;&lt;br /&gt;import net.rim.device.api.system.Characters;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public class HrefField extends Field {&lt;br /&gt;&lt;br /&gt;    private String content;&lt;br /&gt;    private Font fieldFont;&lt;br /&gt;    private int fieldWidth;&lt;br /&gt;    private int fieldHeight;&lt;br /&gt;    private boolean active = false;&lt;br /&gt;    private int backgroundColour = 0xffffff;&lt;br /&gt;    //private int textColour = 0x333333;&lt;br /&gt;    private int textColour = 0x0000ff;&lt;br /&gt;    private int maskColour = 0xBBBBBB;&lt;br /&gt;    &lt;br /&gt;    private int buttonId;&lt;br /&gt;    private String buttonName;&lt;br /&gt;    &lt;br /&gt;    public HrefField(String content) &lt;br /&gt;    {&lt;br /&gt;        super(Field.FOCUSABLE);&lt;br /&gt;        this.content = content;&lt;br /&gt;        fieldFont = defaultFont();&lt;br /&gt;        fieldWidth = fieldFont.getAdvance(content)+2;&lt;br /&gt;        fieldHeight = fieldFont.getHeight() + 3;&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public void setColours(int backgroundColour, int textColour, int maskColour) &lt;br /&gt;    {&lt;br /&gt;        this.backgroundColour = backgroundColour;&lt;br /&gt;        this.textColour = textColour;&lt;br /&gt;        this.maskColour = maskColour;&lt;br /&gt;        invalidate();&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public void setBackgroundColour(int backgroundColour)&lt;br /&gt;    {&lt;br /&gt;        this.backgroundColour = backgroundColour;&lt;br /&gt;        invalidate();&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public void setTextColour(int textColour)&lt;br /&gt;    {&lt;br /&gt;        this.textColour = textColour;&lt;br /&gt;        invalidate();&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public void setMaskColour(int maskColour)&lt;br /&gt;    {&lt;br /&gt;        this.maskColour = maskColour;&lt;br /&gt;        invalidate();&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public void setFont(Font fieldFont)&lt;br /&gt;    {&lt;br /&gt;        this.fieldFont = fieldFont;&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public int getPreferredWidth() &lt;br /&gt;    {&lt;br /&gt;        return fieldWidth;&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public int getPreferredHeight() &lt;br /&gt;    {&lt;br /&gt;        return fieldHeight;&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    protected void layout(int arg0, int arg1) &lt;br /&gt;    {&lt;br /&gt;        setExtent(getPreferredWidth(), getPreferredHeight());&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    protected void paint(Graphics graphics) &lt;br /&gt;    {&lt;br /&gt;    &lt;br /&gt;        if (active) &lt;br /&gt;        {&lt;br /&gt;            graphics.setColor(maskColour);&lt;br /&gt;            graphics.fillRect(0, 0, fieldWidth, fieldHeight);&lt;br /&gt;        } &lt;br /&gt;        else &lt;br /&gt;        {&lt;br /&gt;            graphics.setColor(backgroundColour);&lt;br /&gt;            graphics.fillRect(0, 0, fieldWidth, fieldHeight);&lt;br /&gt;        }&lt;br /&gt;        &lt;br /&gt;        graphics.setColor(textColour);&lt;br /&gt;        graphics.setFont(fieldFont);&lt;br /&gt;        graphics.drawText(content, 1, 1);&lt;br /&gt;        graphics.drawLine(1, fieldHeight-2, fieldWidth-2, fieldHeight-2);&lt;br /&gt;    }&lt;br /&gt;        &lt;br /&gt;    protected boolean navigationClick(int status, int time) &lt;br /&gt;    {&lt;br /&gt;        fieldChangeNotify(1);&lt;br /&gt;        return true;&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public void setButtonId(int buttonId)&lt;br /&gt;    {&lt;br /&gt;        this.buttonId = buttonId;&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public void setButtonName(String buttonName)&lt;br /&gt;    {&lt;br /&gt;        this.buttonName = buttonName;&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public int getButtonId()&lt;br /&gt;    {&lt;br /&gt;        return buttonId;&lt;br /&gt;    }&lt;br /&gt;    public String getButtonName()&lt;br /&gt;    {&lt;br /&gt;        return buttonName;&lt;br /&gt;    }&lt;br /&gt;    public boolean keyChar(char key, int status, int time)&lt;br /&gt;    {&lt;br /&gt;        if (key == Characters.ENTER)&lt;br /&gt;        {&lt;br /&gt;            fieldChangeNotify(0);&lt;br /&gt;            return true;&lt;br /&gt;        }&lt;br /&gt;        &lt;br /&gt;        return false;&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;    protected void onFocus(int direction) &lt;br /&gt;    {&lt;br /&gt;        active = true;&lt;br /&gt;        invalidate();&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    protected void onUnfocus() &lt;br /&gt;    {&lt;br /&gt;        active = false;&lt;br /&gt;        invalidate();&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public static Font defaultFont() &lt;br /&gt;    {&lt;br /&gt;        return Font.getDefault();&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/537260250674612086-756975105368911239?l=blackberry-tips-bikas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blackberry-tips-bikas.blogspot.com/feeds/756975105368911239/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2009/08/clickable-labelfield-act-like-link-href.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/756975105368911239'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/756975105368911239'/><link rel='alternate' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2009/08/clickable-labelfield-act-like-link-href.html' title='Clickable LabelField act like Link (Href Field )'/><author><name>Bikas</name><uri>http://www.blogger.com/profile/12419623956407586096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_AOJV3rdHrNA/TOZZ9POdctI/AAAAAAAAAA4/dDYeLz72-Do/S220/S7304974.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-537260250674612086.post-1487487644740402064</id><published>2009-08-30T00:31:00.000+07:00</published><updated>2009-08-30T00:36:38.525+07:00</updated><title type='text'>Ignore Click Event outside of a Field in Storm</title><content type='html'>&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;In Storm sometimes click event in invoked by clicking outside of a focusable field.&lt;br /&gt;To solve this just add the following code to the MainScreen or a Manager.&lt;br /&gt;&lt;br /&gt;&lt;table border="1"&gt;&lt;tr&gt;&lt;td&gt;&lt;pre&gt;&lt;br /&gt;    protected boolean touchEvent(TouchEvent message)&lt;br /&gt;    {&lt;br /&gt;        int event = message.getEvent();&lt;br /&gt;        if (event == TouchEvent.CLICK || event == TouchEvent.UNCLICK)&lt;br /&gt;        {&lt;br /&gt;            // Ignore clcik events that happen outside any fields&lt;br /&gt;            if (getFieldAtLocation(message.getX(1), message.getY(1)) == -1)&lt;br /&gt;            return true;    // kill the event&lt;br /&gt;        }&lt;br /&gt;        return super.touchEvent(message);&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    // The regular getFieldAtLocation returns wrong values &lt;br /&gt;    //in open spaces in complex managers, so we override it&lt;br /&gt;    public int getFieldAtLocation(int x, int y)&lt;br /&gt;    {&lt;br /&gt;        XYRect rect = new XYRect();&lt;br /&gt;        int index = getFieldCount() -1;&lt;br /&gt;        while (index &gt;= 0)&lt;br /&gt;        {&lt;br /&gt;            getField(index).getExtent(rect);&lt;br /&gt;            if (rect.contains(x, y))&lt;br /&gt;            break;&lt;br /&gt;            --index;&lt;br /&gt;        }&lt;br /&gt;        return index;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/537260250674612086-1487487644740402064?l=blackberry-tips-bikas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blackberry-tips-bikas.blogspot.com/feeds/1487487644740402064/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2009/08/ignore-click-event-outside-of-field-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/1487487644740402064'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/1487487644740402064'/><link rel='alternate' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2009/08/ignore-click-event-outside-of-field-in.html' title='Ignore Click Event outside of a Field in Storm'/><author><name>Bikas</name><uri>http://www.blogger.com/profile/12419623956407586096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_AOJV3rdHrNA/TOZZ9POdctI/AAAAAAAAAA4/dDYeLz72-Do/S220/S7304974.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-537260250674612086.post-4152624443776574738</id><published>2009-08-30T00:15:00.000+07:00</published><updated>2009-08-30T00:26:57.217+07:00</updated><title type='text'>Knowledge Base Article Links</title><content type='html'>&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;Some Knowledge Base Article Links.&lt;br /&gt;&lt;br /&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;1. Application Deployment&lt;br /&gt;#########################&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href="http://www.blackberry.com/knowledgecenterpublic/livelink.exe?func=ll&amp;objId=800647&amp;objAction=browse&amp;sort=name"&gt;Genaral Topics&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;--------------&lt;br /&gt;How To - Define the position of an application icon on the BlackBerry smartphone Home screen How To - Handle stored data when removing an application&lt;br /&gt;How To - Load applications onto a BlackBerry smartphone&lt;br /&gt;Support - A module with that name already exists in the application&lt;br /&gt;Support - Application installation errors&lt;br /&gt;Support - BlackBerry MDS Runtime 1.1.2 with BlackBerry Device Software 4.3.0 stops responding when an application calls from the on_init script&lt;br /&gt;Support - MIDlet has verification error at offset&lt;br /&gt;Support - Module net_rim_bbapi_mail not found&lt;br /&gt;Support - Protocol not found- null error&lt;br /&gt;Support - Unable to activate custom theme or theme not listed&lt;br /&gt;Support - Version 4.0 applications do not run on the device&lt;br /&gt;What Is - Indications of insufficient space to install an application on the BlackBerry device&lt;br /&gt;What Is - JVM error codes&lt;br /&gt;What Is - JVM error codes for BlackBerry Device Software 4.2 and later&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href="http://www.blackberry.com/knowledgecenterpublic/livelink.exe?func=ll&amp;objId=800646&amp;objAction=browse&amp;sort=name"&gt;OTA Download&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;------------&lt;br /&gt;How To - Programmatically read the attributes of a JAD file&lt;br /&gt;Support - 907 Invalid Jar Error when installing an application wirelessly  &lt;br /&gt;Support - Warning - This application does not contain a signature. It might not be from a trusted source.&lt;br /&gt;What Is - The file size limit for wireless downloads&lt;br /&gt;What Is - The required MIME types for a web server to serve BlackBerry applications&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href="http://www.blackberry.com/knowledgecenterpublic/livelink.exe?func=ll&amp;objId=800651&amp;objAction=browse&amp;sort=name"&gt;Desktop Loading&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;---------------&lt;br /&gt;How To - Configure ALX files to make an application 'required'&lt;br /&gt;How To - Create a single ALX file to install multiple versions of an application  &lt;br /&gt;How To - Install the BlackBerry API update via Desktop Manager or wirelessly &lt;br /&gt;How To - Remove wirelessly downloaded applications&lt;br /&gt;How To - Update the registry to deploy Java applications using Desktop Manager&lt;br /&gt;Support - Handheld displays net_rim_xml not found error  &lt;br /&gt;Support - Invalid digital signature errors when installing an application  &lt;br /&gt;Support - No system software was found for your device  &lt;br /&gt;Support - Unspecified error encountered [J-0x00000011] when upgrading a third-party application  &lt;br /&gt;What Is - An .alx file&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href="http://www.blackberry.com/knowledgecenterpublic/livelink.exe?func=ll&amp;objId=800655&amp;objAction=browse&amp;sort=name"&gt;Enterprise server application push&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;-----------------------------------&lt;br /&gt;How To - Deploy an icon to the BlackBerry smartphone for a web application or URL&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href="http://www.blackberry.com/knowledgecenterpublic/livelink.exe?func=ll&amp;objId=1376890&amp;objAction=browse&amp;sort=name"&gt;Blackberry Application Web Loader&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;-----------------------------------&lt;br /&gt;Support - The BlackBerry Application Web Loader is unable to create a local copy of files&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2. Java APIs &amp; Samples&lt;br /&gt;#######################&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href="http://www.blackberry.com/knowledgecenterpublic/livelink.exe?func=ll&amp;objId=800431&amp;objAction=browse&amp;sort=name"&gt;Memory Management&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;-----------------&lt;br /&gt;How To - Download large files using the BlackBerry Mobile Data System&lt;br /&gt;How to - Prevent a memory leak when implementing an ApplicationMenuItem  &lt;br /&gt;Sample Code ---- Object Groups - Why and How to Use Them&lt;br /&gt;What Is - File storage limits in the Content Store&lt;br /&gt;What Is - Object Grouping - Using resources effectively&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href="http://www.blackberry.com/knowledgecenterpublic/livelink.exe?func=ll&amp;objId=800698&amp;objAction=browse&amp;sort=name"&gt;Mail&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;------&lt;br /&gt;How To - Retrieve the default email address for the device  &lt;br /&gt;How To - Access HTML email messages&lt;br /&gt;How To - Capture the contents of email and PIN messages before sending  &lt;br /&gt;How To - Create a custom Attachment Handler on the BlackBerry device  &lt;br /&gt;How To - Create an Attachment  &lt;br /&gt;How To - Create and send messages  &lt;br /&gt;How To - Display a PopupScreen from a SendListener  &lt;br /&gt;How To - Implement the ViewListener interface  &lt;br /&gt;How To - Programmatically send a PIN message  &lt;br /&gt;How To - Retrieve More of a Message  &lt;br /&gt;How To - Send a message from a non-default email address  &lt;br /&gt;Support - Error when sending a PIN message - MessagingExceptionPin message not sent. Do not have the permissions to send the message.&lt;br /&gt;Support - Transport.more fails to retrieve all of a message  &lt;br /&gt;What Is - Application is not notified when new messages arrive&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href=" http://www.blackberry.com/knowledgecenterpublic/livelink.exe?func=ll&amp;objId=800639&amp;objAction=browse&amp;sort=name"&gt;Invoking Blackberry Application&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;-------------------------------&lt;br /&gt;How To - Invoke applications&lt;br /&gt;How to - Make a running UI application go to the background and resume in the foreground&lt;br /&gt;How To - Open a file in a Documents To Go application&lt;br /&gt;What Is - Application does not provide invocation feedback&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href="http://www.blackberry.com/knowledgecenterpublic/livelink.exe?func=ll&amp;objId=800703&amp;obj Action=browse&amp;sort=name"&gt;GPS&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;----&lt;br /&gt;How To - Add an ApplicationMenuItem to BlackBerry Map  &lt;br /&gt;How To - Configure a Bluetooth GPS Receiver for use with the Location API  &lt;br /&gt;How To - Define criteria to retrieve a GPS fix  &lt;br /&gt;How To - Detect when GPS is no longer available and when to reset the LocationProvider  &lt;br /&gt;How To - Invoke BlackBerry Maps  &lt;br /&gt;How To - Manage simultaneous GPS and phone usage on the BlackBerry 8703e and the 7130e smartphones  &lt;br /&gt;Support - Cellsite fix prevents acquiring autonomous GPS fixes  &lt;br /&gt;Support - Incorrect network time  &lt;br /&gt;Support - Invoking BlackBerry Maps throws unexpected runtime exception  &lt;br /&gt;What Is - Best practices for designing GPS applications for BlackBerry smartphones operating on CDMA networks  &lt;br /&gt;What Is - BlackBerry Maps location document format  &lt;br /&gt;What Is - The BlackBerry smartphone models and their corresponding GPS capabilities  &lt;br /&gt;What Is - Verizon GPSSettings signing requirement&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href=" http://www.blackberry.com/knowledgecenterpublic/livelink.exe?func=ll&amp;objId=800779&amp;objAction=browse&amp;sort=name"&gt;Cryptography APIs and Security&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;------------------------------&lt;br /&gt;How To - Save requested application permissions in the Application Permissions screen  &lt;br /&gt;How To - Create a Unique long from a String  &lt;br /&gt;How to - Use Advanced Encryption  &lt;br /&gt;How to - Use Basic Encryption  &lt;br /&gt;How To - Use Content Protection&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href="http://www.blackberry.com/knowledgecenterpublic/livelink.exe?func=ll&amp;objId=800440&amp;objAction=browse&amp;sort=name"&gt;Browser API&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;-----------&lt;br /&gt;&lt;br /&gt;How To - Change the RenderingOptions of a RenderingSession  &lt;br /&gt;How To - Create a Fixed Size BrowserField  &lt;br /&gt;How To - Create a web icon  &lt;br /&gt;How to - Create a web signal registration application  &lt;br /&gt;How To - Enable cookies in BrowserField  &lt;br /&gt;How To - Invoke a non-default browser session  &lt;br /&gt;How To - Invoke the browser  &lt;br /&gt;How To - Invoke the browser with raw HTML  &lt;br /&gt;How To - Invoke the default browser&lt;br /&gt;How To - Perform a browser push over SSL&lt;br /&gt;What Is - A ControlledAccessException is thrown when using the HttpFilterRegistry  &lt;br /&gt;What Is - The Push notification format&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href=" http://www.blackberry.com/knowledgecenterpublic/livelink.exe?func=ll&amp;objId=800441&amp;objAction=browse&amp;sort=name"&gt;Bluetooth - USB - Serial&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;-------------------------&lt;br /&gt;How To - Run the BlackBerry Serial Port Demo  &lt;br /&gt;How To - Use the Bluetooth classes  &lt;br /&gt;How To - Use the ServiceRouting API  &lt;br /&gt;Support - IOException thrown when opening a server-side Bluetooth connection &lt;br /&gt;What Is - Bluetooth support on BlackBerry devices&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href="http://www.blackberry.com/knowledgecenterpublic/livelink.exe?func=ll&amp;objId=1089414&amp;objAction=browse&amp;sort=name"&gt;Audio &amp; Video&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;--------------&lt;br /&gt;How To - Invoke the media application  &lt;br /&gt;How To - Obtain the media playback time from a media application  &lt;br /&gt;How To - Play audio in an application  &lt;br /&gt;How To - Play video within a BlackBerry smartphone application  &lt;br /&gt;How To - Record audio on a BlackBerry smartphone  &lt;br /&gt;How To - Specify Audio Path Routing  &lt;br /&gt;How To - Support streaming audio to the media application  &lt;br /&gt;How To - Take a snapshot using the built-in camera of a BlackBerry smartphone  &lt;br /&gt;Known Issue - Delay in playing audio when streaming to a Bluetooth headset  &lt;br /&gt;Support - Alert.startBuzzer() does not work  &lt;br /&gt;Support - Playing audio in an application pauses the Media application on BlackBerry smartphones running on the CDMA network  &lt;br /&gt;What Is - Media application error codes &lt;br /&gt;What Is - setMediaTime does not work for AMR files  &lt;br /&gt;What Is - Supported audio formats&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href=" http://www.blackberry.com/knowledgecenterpublic/livelink.exe?func=ll&amp;objId=800367&amp;objAction=browse&amp;sort=name"&gt;Menu Item and Options&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;-----------------------&lt;br /&gt;How To - Add a custom menu item to an existing BlackBerry application  &lt;br /&gt;How To - Add application options to the BlackBerry Options  &lt;br /&gt;How To - Handle ApplicationMenuItem Invocation&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href="http://www.blackberry.com/knowledgecenterpublic/livelink.exe?func=ll&amp;objId=800429&amp;objAction=browse&amp;sort=name"&gt;MIDP &amp; CLDC APIs&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;----------------&lt;br /&gt;How To - Access images in a MIDP application  &lt;br /&gt;How To - Capture volume keys in a MIDlet  &lt;br /&gt;How To - Create a MIDlet that uses custom animation  &lt;br /&gt;How To - Create an auto-start MIDlet using the PushRegistry  &lt;br /&gt;How To - Establish an HTTP connection  &lt;br /&gt;How To - Implement basic HTTP authentication  &lt;br /&gt;How To - Register a MIDlet with the PushRegistry   &lt;br /&gt;How To - Use RMS storage efficiently in BlackBerry applications  &lt;br /&gt;Support - Classname does not exist in the current application package  &lt;br /&gt;Support - Verification error using javax.microedition.rms.RecordStore on BlackBerry Device Software 3.8 and 4.0  &lt;br /&gt;What Is - Cannot run a MIDP 2.0 application in BlackBerry Device Software 4.0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href=" http://www.blackberry.com/knowledgecenterpublic/livelink.exe?func=ll&amp;objId =832062&amp;objAction=browse&amp;sort=name"&gt;Micellaneous&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;------------&lt;br /&gt;How To - Access and Obtain Service Books on a device&lt;br /&gt;How To - Capture Signature on the BlackBerry Storm  &lt;br /&gt;How to - Create a singleton using the RuntimeStore  &lt;br /&gt;How To - Detect Alt and Shift key clicks  &lt;br /&gt;How To - Determine if a BlackBerry smartphone supports Wi-Fi capabilities  &lt;br /&gt;How to - Display custom messages in the request permission dialog  &lt;br /&gt;How To - Format the electronic serial number (ESN)  &lt;br /&gt;How To - Get time zone offsets with DST  &lt;br /&gt;How To - Implement a Comparator to compare objects  &lt;br /&gt;How To - Implement a string splitter based on a given string delimiter  &lt;br /&gt;How To - Interpret wireless network signal levels How To - Write safe initialization code  &lt;br /&gt;Known Issue - The RadioStatusListener.mobilityManagementEvent method is not invoked  &lt;br /&gt;Support - Preventing verification errors  &lt;br /&gt;What is - Event injection  &lt;br /&gt;What Is - New and Deprecated APIs in BlackBerry Java Development Environment 4.0&lt;br /&gt;What Is - New and Deprecated APIs in BlackBerry Java Development Environment 4.1&lt;br /&gt;What Is - New and Deprecated APIs in BlackBerry Java Development Environment 4.2&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href="http://www.blackberry.com/knowledgecenterpublic/livelink.exe?func=ll&amp;objId=1467358&amp;objAction=browse&amp;sort=name"&gt;Networking&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;----------&lt;br /&gt;How to - Determine the country code of the current mobile subscriber  How To - Determine the MCC and MNC of the current network&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href=" http://www.blackberry.com/knowledgecenterpublic/livelink.exe?func=ll&amp;objId=1295814&amp;objAction=browse&amp;sort=name"&gt;Persistence&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;-----------&lt;br /&gt;How To - Programmatically determine if a microSD card has been inserted&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href=" http://www.blackberry.com/knowledgecenterpublic/livelink.exe?func=ll&amp;objId=800536&amp;objAction=browse&amp;sort=name"&gt;Phone&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;-----&lt;br /&gt;How To - Implement the PhoneListener interface  &lt;br /&gt;How To - Log Phone Calls  &lt;br /&gt;Support - The getDevicePhone method returns null&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href="http://www.blackberry.com/knowledgecenterpublic/livelink.exe?func=ll&amp;objId=800363&amp;objAction=browse&amp;sort=name"&gt;PIM-PDAP&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;--------&lt;br /&gt;How To - Access Address Book contacts  &lt;br /&gt;How To - Add a PIM item to a custom category  &lt;br /&gt;How To - Create an Event within the Calendar application  &lt;br /&gt;How To - Launch the Address Book and return a contact  &lt;br /&gt;How To - Use Remote Address Lookup through coding  Support - Application stops receiving event notifications when using the PIMListListener API&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href=" http://www.blackberry.com/knowledgecenterpublic/livelink.exe?func=ll&amp;objId=800533&amp;objAction=browse&amp;sort=name"&gt;SVG Content&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;-----------&lt;br /&gt;How to - Use Plazmic Content Developer's Kit in your BlackBerry Application&lt;br /&gt;Known Issue - Irregular focus behaviour on first hotspot when loading PME content  &lt;br /&gt;Known Issue - Losing the anchor when rendering SVG images in MIDlets  &lt;br /&gt;What Is - Browser fails to retrieve resources using relative URLs in PME content&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href="http://www.blackberry.com/knowledgecenterpublic/livelink.exe?func=ll&amp;objId=800625&amp;objAction=browse&amp;sort=name"&gt;Synchronization APIs&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;--------------------&lt;br /&gt;How To - Backup and restore small amounts of data using SyncItem  &lt;br /&gt;How To - Compile the Desktop Add-In sample  &lt;br /&gt;How To - Save data with RMS  &lt;br /&gt;How To - Store persistent data on the BlackBerry smartphone&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href="http://www.blackberry.com/knowledgecenterpublic/livelink.exe?func=ll&amp;objId=800620&amp;objAction=browse&amp;sort=name"&gt;System Classes&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;--------------&lt;br /&gt;How To - Add plain text or binary files to an application &lt;br /&gt;How To - Allow an application to restart itself  &lt;br /&gt;How to - Capture power change events  &lt;br /&gt;How to - Code time-sensitive applications  &lt;br /&gt;How To - Detect if the BlackBerry smartphone is holstered or flipped  &lt;br /&gt;How To - Display a GUI when the BlackBerry device starts up  &lt;br /&gt;How To - Enable the backlight and prevent the screen from turning off  &lt;br /&gt;How To - Launch a third-party application from another third-party application  &lt;br /&gt;How To - Obtain the operating system version of a BlackBerry wireless device &lt;br /&gt;How to - Programmatically install and upgrade applications  &lt;br /&gt;How To - Retrieve the BlackBerry Device Software version  &lt;br /&gt;Support - An unsupported API was called by the JVM RadioGetGprsState  &lt;br /&gt;Support - getObjectSize and getAllocated return 0  &lt;br /&gt;What Is - Global Events and Global Event Listeners  &lt;br /&gt;What Is - Supported System.getProperty keys  &lt;br /&gt;What Is - System Global Events  &lt;br /&gt;What Is - The reason a reset is required when upgrading an application&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href=" http://www.blackberry.com/knowledgecenterpublic/livelink.exe?func=ll&amp;objId=973748&amp;objAction=browse&amp;sort=name"&gt;Voice Notes&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;----------&lt;br /&gt;How To - Use the Voice Notes APIs&lt;br /&gt;Samples --- VoiceNotesDemo Sample Code&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href=" http://www.blackberry.com/knowledgecenterpublic/livelink.exe?func=ll&amp;objId=800599&amp;objAction=browse&amp;sort=name"&gt;XML&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;---&lt;br /&gt;How To - Control the behavior of white space when parsing an XML document  &lt;br /&gt;How To - Use the XML Parser&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;User Interface&lt;br /&gt;--------------&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href=" http://www.blackberry.com/knowledgecenterpublic/livelink.exe?func=ll&amp;objId=800345&amp;objAction=browse&amp;sort=name"&gt;Fields&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;======&lt;br /&gt;How To - Add a TreeField to a device screen  &lt;br /&gt;How To - Apply a phone number filter to an AutoTextEdit field  &lt;br /&gt;How To - Change the text color of a field  &lt;br /&gt;How To - Create a colour ListField &lt;br /&gt;How To - Create a custom field using attributes of other UI objects  &lt;br /&gt;How To - Create a custom width for a ListField  &lt;br /&gt;How To - Create a ListField with check boxes  &lt;br /&gt;How To - Create a Scrollable Image Field  &lt;br /&gt;How To - Create custom fields  &lt;br /&gt;How To - Determine the number of visible items on the BlackBerry device screen  &lt;br /&gt;How To - Display a progress bar in handheld applications&lt;br /&gt;How To - Display an animated GIF  &lt;br /&gt;How To - Display dates and times in handheld applications  &lt;br /&gt;How To - Format text in a RichTextField  &lt;br /&gt;How to - Make list items appear on a screen  &lt;br /&gt;How To - Show focus changes using BitmapField  &lt;br /&gt;How to - Use an image in an application  &lt;br /&gt;How To - Use the paint() method to draw objects to the screen  &lt;br /&gt;How To - Work around ListField painting issue in early versions of BlackBerry Device Software version 4.2.2  &lt;br /&gt;Support - A Field's font is displayed incorrectly when set in the paint method  &lt;br /&gt;Support - Error starting [Application Name].Symbol'DateField.[init] not found  &lt;br /&gt;Support - NullPointerException is thrown when the isEditable and fieldChangeNotify methods of EditField are overridden  &lt;br /&gt;Support - The Custom Field is not drawing properly&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href="http://www.blackberry.com/knowledgecenterpublic/livelink.exe?func=ll&amp;objId=800508&amp;objAction=browse&amp;sort=name"&gt;Managers&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;========&lt;br /&gt;How To - Create a custom layout manager for a screen  &lt;br /&gt;How To - Create a screen with stationary headings  &lt;br /&gt;How To - Create tabbed view screens  &lt;br /&gt;How To - Manage bitmaps in an application using field managers  &lt;br /&gt;How to - Perform double buffering using the BlackBerry UI  &lt;br /&gt;How To - Place multiple UI fields on one line  &lt;br /&gt;How to - Use the User Interface API to create an editable table  &lt;br /&gt;Support - My scrollable manager is not scrolling&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href="http://www.blackberry.com/knowledgecenterpublic/livelink.exe?func=ll&amp;objId=800256&amp;objAction=browse&amp;sort=name"&gt;Screens&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;=======&lt;br /&gt;How to - Change the background color of a screen  &lt;br /&gt;How To - Clear the status of a MainScreen  &lt;br /&gt;How To - Create a custom Dialog  &lt;br /&gt;How To - Create a File Selection Popup Screen  &lt;br /&gt;How To - Create a splash screen  &lt;br /&gt;How To - Have Your Application Perform an Action after a Global Alert  &lt;br /&gt;How to - listen for a dialog closed event  &lt;br /&gt;How To - Obtain the Height and Width of a Screen  &lt;br /&gt;How To - Prevent a UiApplication from being listed in the application switcher  &lt;br /&gt;How To - Properly Push and Pop Global Screens  &lt;br /&gt;How to - Protect BlackBerry applications with a password screen  &lt;br /&gt;How To - Remove the default "Close" or "Hide" MenuItems from a Screen  &lt;br /&gt;How to - Update a screen on the Main Event Thread  &lt;br /&gt;How To - Use a Backdoor Sequence&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href="http://www.blackberry.com/knowledgecenterpublic/livelink.exe?func=ll&amp;objId=800608&amp;objAction=browse&amp;sort=name"&gt;General&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;=======&lt;br /&gt;How To - Add Copy, Paste, and other context-specific items to a menu&lt;br /&gt;How To - Alert a user from a Background application  &lt;br /&gt;How To - Capture and save a screen shot  &lt;br /&gt;How To - Change fonts in a BlackBerry application  &lt;br /&gt;How To - Control the screen orientation  &lt;br /&gt;How To - Create an icon for an application  &lt;br /&gt;How To - Define a rollover icon for an application  &lt;br /&gt;How To - Detect when an application or screen moves to the foreground or background  &lt;br /&gt;How To - Distinguish between a full menu and a primary actions menu  &lt;br /&gt;How to - Leverage pattern matching in BlackBerry smartphone applications to provide an integrated user experience  &lt;br /&gt;How to - Make your BlackBerry application more user-friendly  &lt;br /&gt;How to - Manage UI interactions  &lt;br /&gt;How To - Programmatically determine type of keyboard  &lt;br /&gt;How To - Use a background image in application screens  &lt;br /&gt;Known Issue - Screen.invalidate() does not cause a subsequent call to paint()  &lt;br /&gt;What Is - BlackBerry UI hierarchy  &lt;br /&gt;What Is - Image formats used in BlackBerry applications  &lt;br /&gt;What Is - Screen buffer size&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3. &lt;span style="font-weight:bold;"&gt;&lt;a href=" http://www.blackberry.com/knowledgecenterpublic/livelink.exe?func=ll&amp;objId=1608023&amp;objAction=browse&amp;sort=name"&gt;Blackberry Administration API&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;################################&lt;br /&gt;How To - Get started with the BlackBerry Administration API&lt;br /&gt;What Is - Sample application demonstrating BlackBerry Administration API technology&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;4. &lt;span style="font-weight:bold;"&gt;&lt;a href=" http://www.blackberry.com/knowledgecenterpublic/livelink.exe?func=ll&amp;objId=800901&amp;objAction=browse&amp;sort=name"&gt;Blackberry JDE&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;#################&lt;br /&gt;&lt;br /&gt;Executing clean.bat does not delete third-party applications from the BlackBerry Smartphone Simulator  &lt;br /&gt;How To - Add a Certificate to DeviceKeyStore&lt;br /&gt;How To - Add files to a project  &lt;br /&gt;How To - Compile a JAR file into a BlackBerry Library  &lt;br /&gt;How To - Compile a MIDlet into a COD file  &lt;br /&gt;How To - Compile an application  &lt;br /&gt;How To - Configure an application to start automatically when the device is turned on  &lt;br /&gt;How To - Configure multiple versions of BlackBerry JDE on the same computer  &lt;br /&gt;How To - Configure the BlackBerry Mobile Data Service Simulator to allow reliable push connections  &lt;br /&gt;How To - Connect the JDE to a specified simulator bundle  &lt;br /&gt;How To - Debug an application running on a live BlackBerry smartphone  &lt;br /&gt;How To - Detect a deadlock using the JDE  &lt;br /&gt;How to - Detect system availability on startup  &lt;br /&gt;How To - Determine the Current Network Name  &lt;br /&gt;How To - Enable a keyboard shortcut for an application  &lt;br /&gt;How To - Find memory leaks in code  &lt;br /&gt;How To - Gain access to the BlackBerry JDE  &lt;br /&gt;How To - Get started with the BlackBerry JDE  &lt;br /&gt;How To - Obfuscate code for a BlackBerry application  &lt;br /&gt;How To - Setup an alternate entry point for my application  &lt;br /&gt;How To - Update the Path environment variable  &lt;br /&gt;How To - Use Javaloader to take a screen shot  &lt;br /&gt;How To - Use the Coverage tool to provide code coverage when testing applications  &lt;br /&gt;How To - Use the Profiler tool to optimize application code  &lt;br /&gt;How To - Use the RAPC compiler  &lt;br /&gt;Support - BlackBerry Java Development Environment and supported locales  &lt;br /&gt;Support - BlackBerry JDE 3.7 IDE Fatal Error on startup  &lt;br /&gt;Support - BlackBerry JDE crashes when using the Objects view  &lt;br /&gt;Support - BlackBerry JDE fails to start  &lt;br /&gt;Support - BlackBerry JDE JAR files no longer function after WinRAR is installed  &lt;br /&gt;Support - BlackBerry JDE stops responding when viewing project properties  &lt;br /&gt;Support - Compiled application size is larger in BlackBerry JDE 4.3.0 or later  &lt;br /&gt;Support - Connection Timeout error when launching JDWP from Eclipse  &lt;br /&gt;Support - Error - com.sun.tools.javac.code.Symbol$CompletionFailure - file net\rim\device\internal\ui\Border.class not found  &lt;br /&gt;Support - Error cod data section too large&lt;br /&gt;Support - Error when debugging - Cannot find RIMIDEWin32Util.dll. This is a required component of the IDE.  &lt;br /&gt;Support - How to fix BlackBerry JDE screen artifacts  &lt;br /&gt;Support - I/O Error CreateProcess  &lt;br /&gt;Support - I/O Error Import file not found appears when building an application  &lt;br /&gt;Support - Missing stack map at label  &lt;br /&gt;Support - Ordinal 11 could not be located in the dynamic link library DSound.dll  &lt;br /&gt;Support - Signing does not apply the RIM Runtime signature key  &lt;br /&gt;Support - Unable to Open Socket when running JDWP &lt;br /&gt;Support - Vtable record size exceeds maximum record size&lt;br /&gt;What Is - A library and how to use it  &lt;br /&gt;What Is - A stack trace  &lt;br /&gt;What Is - Appropriate version of the BlackBerry JDE  &lt;br /&gt;What Is - Control Flow Verification Information Too Large &lt;br /&gt;What Is - Introduction to the BlackBerry JDE  &lt;br /&gt;What Is - 'javaw' error when starting the JDE after installation  &lt;br /&gt;What Is - Supported versions of Java for different BlackBerry JDE versions  &lt;br /&gt;What is - The Alias List for a project in the BlackBerry JDE &lt;br /&gt;What Is - The debugger  &lt;br /&gt;What Is - The project size limit&lt;br /&gt;What Is - Writing applications for the Java-based BlackBerry Wireless Handhelds in C and C++ native code&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/537260250674612086-4152624443776574738?l=blackberry-tips-bikas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blackberry-tips-bikas.blogspot.com/feeds/4152624443776574738/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2009/08/knowledge-base-article-links.html#comment-form' title='16 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/4152624443776574738'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/4152624443776574738'/><link rel='alternate' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2009/08/knowledge-base-article-links.html' title='Knowledge Base Article Links'/><author><name>Bikas</name><uri>http://www.blogger.com/profile/12419623956407586096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_AOJV3rdHrNA/TOZZ9POdctI/AAAAAAAAAA4/dDYeLz72-Do/S220/S7304974.JPG'/></author><thr:total>16</thr:total></entry><entry><id>tag:blogger.com,1999:blog-537260250674612086.post-8847256405061894504</id><published>2009-08-29T23:58:00.000+07:00</published><updated>2009-08-30T00:14:14.789+07:00</updated><title type='text'>Resize Image in Blackberry</title><content type='html'>Sometimes it is needed to resize an image.&lt;br /&gt;Resizing an image to a smaller resolution may cause some distortion of the image.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Image can be programatically resize in many ways.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Approach 1&lt;br /&gt;----------&lt;br /&gt;&lt;table border="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;pre&gt;&lt;br /&gt;  private Bitmap getScaledBitmapImage(EncodedImage image, int width, int height)&lt;br /&gt;  {&lt;br /&gt;      // Handle null image&lt;br /&gt;      if (image == null)&lt;br /&gt;      {&lt;br /&gt;          return null;&lt;br /&gt;      }&lt;br /&gt;    &lt;br /&gt;      //return bestFit(image.getBitmap(), width, height);&lt;br /&gt;    &lt;br /&gt;      int currentWidthFixed32 = Fixed32.toFP(image.getWidth());&lt;br /&gt;      int currentHeightFixed32 = Fixed32.toFP(image.getHeight());&lt;br /&gt;    &lt;br /&gt;      int requiredWidthFixed32 = Fixed32.toFP(width);&lt;br /&gt;      int requiredHeightFixed32 = Fixed32.toFP(height);&lt;br /&gt;    &lt;br /&gt;      int scaleXFixed32 = Fixed32.div(currentWidthFixed32, requiredWidthFixed32);&lt;br /&gt;      int scaleYFixed32 = Fixed32.div(currentHeightFixed32, requiredHeightFixed32);&lt;br /&gt;    &lt;br /&gt;      image = image.scaleImage32(scaleXFixed32, scaleYFixed32);&lt;br /&gt;    &lt;br /&gt;      return image.getBitmap();&lt;br /&gt;  }&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Approach 2&lt;br /&gt;------------&lt;br /&gt;&lt;table border="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;pre&gt;&lt;br /&gt;  public static Bitmap resizeBitmap(Bitmap image, int width, int height)&lt;br /&gt;  {&lt;br /&gt;      int imageWidth = image.getWidth();&lt;br /&gt;      int imageHeight = image.getHeight();&lt;br /&gt;    &lt;br /&gt;      // Need an array (for RGB, with the size of original image)&lt;br /&gt;      int rgb[] = new int[imageWidth * imageHeight];&lt;br /&gt;    &lt;br /&gt;      // Get the RGB array of image into "rgb"&lt;br /&gt;      image.getARGB(rgb, 0, imageWidth, 0, 0, imageWidth, imageHeight);&lt;br /&gt;    &lt;br /&gt;      // Call to our function and obtain rgb2&lt;br /&gt;      int rgb2[] = rescaleArray(rgb, imageWidth, imageHeight, width, height);&lt;br /&gt;    &lt;br /&gt;      // Create an image with that RGB array&lt;br /&gt;      Bitmap temp2 = new Bitmap(width, height);&lt;br /&gt;    &lt;br /&gt;      temp2.setARGB(rgb2, 0, width, 0, 0, width, height);&lt;br /&gt;    &lt;br /&gt;      return temp2;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  private static int[] rescaleArray(int[] ini, int x, int y, int x2, int y2)&lt;br /&gt;  {&lt;br /&gt;      int out[] = new int[x2*y2];&lt;br /&gt;      for (int yy = 0; yy &lt; y2; yy++)&lt;br /&gt;      {&lt;br /&gt;          int dy = yy * y / y2;&lt;br /&gt;          for (int xx = 0; xx &lt; x2; xx++)&lt;br /&gt;          {&lt;br /&gt;              int dx = xx * x / x2;&lt;br /&gt;              out[(x2 * yy) + xx] = ini[(x * dy) + dx];&lt;br /&gt;          }&lt;br /&gt;      }&lt;br /&gt;      return out;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Approach 3&lt;br /&gt;----------&lt;br /&gt;&lt;table border="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;pre&gt;&lt;br /&gt;   public static Bitmap bestFit(Bitmap image, int maxWidth, int maxHeight)&lt;br /&gt;   {&lt;br /&gt;       // getting image properties&lt;br /&gt;       int w = image.getWidth();&lt;br /&gt;       int h = image.getHeight();&lt;br /&gt;     &lt;br /&gt;       //  get the ratio&lt;br /&gt;       int ratiow = 100 * maxWidth / w;&lt;br /&gt;       int ratioh = 100 * maxHeight / h;&lt;br /&gt;     &lt;br /&gt;       // this is to find the best ratio to&lt;br /&gt;       // resize the image without deformations&lt;br /&gt;       int ratio = Math.min(ratiow, ratioh);&lt;br /&gt;     &lt;br /&gt;       // computing final desired dimensions&lt;br /&gt;       int desiredWidth = w * ratio / 100;&lt;br /&gt;       int desiredHeight = h * ratio / 100;&lt;br /&gt;     &lt;br /&gt;       //resizing&lt;br /&gt;       return resizeBitmap(image, desiredWidth, desiredHeight);&lt;br /&gt;   }&lt;br /&gt;   &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/537260250674612086-8847256405061894504?l=blackberry-tips-bikas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blackberry-tips-bikas.blogspot.com/feeds/8847256405061894504/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2009/08/resize-image-in-blackberry.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/8847256405061894504'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/8847256405061894504'/><link rel='alternate' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2009/08/resize-image-in-blackberry.html' title='Resize Image in Blackberry'/><author><name>Bikas</name><uri>http://www.blogger.com/profile/12419623956407586096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_AOJV3rdHrNA/TOZZ9POdctI/AAAAAAAAAA4/dDYeLz72-Do/S220/S7304974.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-537260250674612086.post-7017262097997280199</id><published>2009-08-29T23:50:00.000+07:00</published><updated>2009-08-29T23:56:12.372+07:00</updated><title type='text'>907: Invalid Jar</title><content type='html'>During installing blackberry application through OTA this the following error message may occur.&lt;br /&gt;&lt;b&gt;“Invalid 907 COD: Unable to import ZIP file”.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;To resolve this problem:&lt;br /&gt;If the cod file size is more than 64K then Rename your big *.cod file to *.zip file and unzip it. Then there will be several smaller *.cod files. Now delete the *.zip file.&lt;br /&gt;&lt;br /&gt;Also the details soltion of this error is described in this &lt;a href="http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800708/800646/Support_-_907_Invalid_Jar_Error_when_installing_an_application_wirelessly.html?nodeid=1017517&amp;amp;vernum=0"&gt;Knowledge Base Article&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/537260250674612086-7017262097997280199?l=blackberry-tips-bikas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blackberry-tips-bikas.blogspot.com/feeds/7017262097997280199/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2009/08/907-invalid-jar.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/7017262097997280199'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/7017262097997280199'/><link rel='alternate' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2009/08/907-invalid-jar.html' title='907: Invalid Jar'/><author><name>Bikas</name><uri>http://www.blogger.com/profile/12419623956407586096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_AOJV3rdHrNA/TOZZ9POdctI/AAAAAAAAAA4/dDYeLz72-Do/S220/S7304974.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-537260250674612086.post-4935000082674152958</id><published>2009-08-29T23:11:00.000+07:00</published><updated>2009-08-30T12:20:44.935+07:00</updated><title type='text'>OTA Installation of a Blackberry Application</title><content type='html'>&lt;br /&gt;&lt;br /&gt;After completing an application the next big step is to install the application OTA(over the air).&lt;br /&gt;&lt;br /&gt;The Steps for OTA installation&lt;br /&gt;------------------------------&lt;br /&gt;&lt;br /&gt;1. For OTA the cod and jad files will be needed.&lt;br /&gt;&lt;br /&gt;2. Sign your cod if required.&lt;br /&gt;&lt;br /&gt;3. Now if cod file size  is bigger than 64 kb then rename it to *.zip file and try &lt;br /&gt;   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;to unzip.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;a. If it cannot be unzipped rename it to *.cod, there are no sibling files inside.  &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;b. If it can be unzipped, delete zip file after it is unzipped.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Then you will have more than one cod like name.cod, name-1.cod, name-2.code, and so on.&lt;br /&gt;&lt;br /&gt;4. Place jad file and all extracted cod files to a folder(for example : ota) on &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;your web-site.&lt;br /&gt;&lt;br /&gt;5. Now you have to set MIME types for the files. &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;a) Inside the folder (ota) that contains jad and cods, create a file with name .htaccess  &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;please note a dot symbol before the name.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;b) And add the following content to this file and save it.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;b&gt;AddType text/vnd.sun.j2me.app-descriptor jad&lt;/b&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;b&gt;AddType application/java-archive jar&lt;/b&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;b&gt;AddType application/vnd.rim.cod cod&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;6. Now you are ready to install the application through OTA.&lt;br /&gt;   &lt;br /&gt;7. Just hit the link of the jad file through the bb browser. It will automatically &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;start install the application in the device.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/537260250674612086-4935000082674152958?l=blackberry-tips-bikas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blackberry-tips-bikas.blogspot.com/feeds/4935000082674152958/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2009/08/ota-installtion.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/4935000082674152958'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/4935000082674152958'/><link rel='alternate' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2009/08/ota-installtion.html' title='OTA Installation of a Blackberry Application'/><author><name>Bikas</name><uri>http://www.blogger.com/profile/12419623956407586096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_AOJV3rdHrNA/TOZZ9POdctI/AAAAAAAAAA4/dDYeLz72-Do/S220/S7304974.JPG'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-537260250674612086.post-4091405300614376183</id><published>2009-08-02T15:48:00.000+07:00</published><updated>2009-08-02T16:10:12.669+07:00</updated><title type='text'>How to Add jar file in Blackberry</title><content type='html'>&lt;br /&gt;&lt;br /&gt;Something it is required to add third party application jar in your blackberry application.&lt;br /&gt;For example you want to use &lt;a href="http://kxml.sourceforge.net/"&gt;KXML Parser&lt;/a&gt; to parse XML in your application.&lt;br /&gt;&lt;br /&gt;Then go through the steps below to add the kxml jar to your application:&lt;br /&gt;----------------------------------------------------------------------------------------&lt;br /&gt;1.Preverify your jar file (just in case if it is not preverified). Follow the steps below for preverifying:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;a. Go to your JDE installation folder (C:\Program Files\Research In Motion\BlackBerry JDE 4.3.0\bin)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;b. Copy the jar file to bin folder.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;c. Now open your command prompt and change your current directory to your JDE installation directory.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;d. Now execute the following command:&lt;br /&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;preverify -classpath "C:\Program Files\Research In Motion\BlackBerry JDE 4.3.0\lib\net_rim_api.jar" "your_jar_filename" &lt;/p&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;e. In your bin directory(C:\Program Files\Research In Motion\BlackBerry JDE 4.3.0\bin) a folder named output will create.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;f. Preverified jar file resides here.&lt;br /&gt;&lt;br /&gt;2.Now Add the preverified jar file to your project like normal java file (Right Click on the project -&gt; All File to &amp;nbsp;&amp;nbsp;&amp;nbsp;Project...).  &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;If it not works with just adding then you have to add the jar as a library project.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800901/How_To_-_Compile_a_JAR_file_into_a_BlackBerry_Library.html?nodeid=801017&amp;vernum=0"&gt;How_To_-_Compile_a_JAR_file_into_a_BlackBerry_Library&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/537260250674612086-4091405300614376183?l=blackberry-tips-bikas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blackberry-tips-bikas.blogspot.com/feeds/4091405300614376183/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2009/08/how-to-add-jar-file-in-blackberry.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/4091405300614376183'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/4091405300614376183'/><link rel='alternate' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2009/08/how-to-add-jar-file-in-blackberry.html' title='How to Add jar file in Blackberry'/><author><name>Bikas</name><uri>http://www.blogger.com/profile/12419623956407586096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_AOJV3rdHrNA/TOZZ9POdctI/AAAAAAAAAA4/dDYeLz72-Do/S220/S7304974.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-537260250674612086.post-2388438412601864901</id><published>2009-08-02T15:33:00.000+07:00</published><updated>2009-08-02T15:43:32.439+07:00</updated><title type='text'>How to Animate GIF Image in Blackberry</title><content type='html'>&lt;br /&gt;&lt;br /&gt;For animating a gif image in bb screen follow the steps:&lt;br /&gt;-------------------------------------------------------------------------------&lt;br /&gt;1. Add the gif image (ex. myImage.gif) in the project (Right Click on the Project -&gt; Add File to Project...).&lt;br /&gt;&lt;br /&gt;2. Images added to a project are automatically converted into the Portable Network Graphics     (PNG) format when &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;the application is built into a .cod file.&lt;br /&gt;&lt;br /&gt;3. This problem can be resolved by any of the following approach:&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;a. rename the gif image as *.bin (myImage.bin) and then add in the project&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;b. Project Properties -&gt; Compile Tab -&gt; Check Don't convert image files to PNG&lt;br /&gt;&lt;br /&gt;4. Load the image into GIFEncodedImage &lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;GIFEncodedImage image;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;EncodedImage encodedImage = EncodedImage.getEncodedImageResource("myImage.bin");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;byte data[] = new byte[4000];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;data = encodedImage.getData();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;image =(GIFEncodedImage) EncodedImage.createEncodedImage(data,0,data.length);&lt;br /&gt;&lt;br /&gt;5. Create a &lt;a href="http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800505/800345/How_To_-_Display_an_animated_GIF.html?nodeid=1405903&amp;vernum=0"&gt;AnimatedGIFField&lt;/a&gt; using the GIFEncodedImage&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;AnimatedGIFField animatedGIF = new AnimatedGIFField(image);&lt;br /&gt;&lt;br /&gt;6. Finally add the field into the screen and get gif image animated.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;add(animatedGIF);    &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/537260250674612086-2388438412601864901?l=blackberry-tips-bikas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blackberry-tips-bikas.blogspot.com/feeds/2388438412601864901/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2009/08/how-to-animate-gif-image-in-blackberry.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/2388438412601864901'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/2388438412601864901'/><link rel='alternate' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2009/08/how-to-animate-gif-image-in-blackberry.html' title='How to Animate GIF Image in Blackberry'/><author><name>Bikas</name><uri>http://www.blogger.com/profile/12419623956407586096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_AOJV3rdHrNA/TOZZ9POdctI/AAAAAAAAAA4/dDYeLz72-Do/S220/S7304974.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-537260250674612086.post-4857676367821082337</id><published>2009-07-28T00:15:00.000+07:00</published><updated>2009-07-28T00:31:33.640+07:00</updated><title type='text'>Writing Custom TextBox in Blackberry</title><content type='html'>Something it is required to write customized TextBox because using native API you cannot get the border, backgound color, backgroung image, left shift characters when text are more than one line without customizing.&lt;br /&gt;&lt;br /&gt;In such type of cases you can create a Class extending Field&lt;br /&gt;and the following things have to override:&lt;br /&gt;* sublayout()&lt;br /&gt;* paint()&lt;br /&gt;* getPreferredWidth()&lt;br /&gt;* getPreferredHeight()&lt;br /&gt;&lt;br /&gt;The below Class demonstrate the above implementation:&lt;br /&gt;&lt;table border="1" align="center"&gt;&lt;tr&gt;&lt;td&gt;&lt;pre&gt;&lt;br /&gt;import net.rim.device.api.ui.Manager;&lt;br /&gt;import net.rim.device.api.ui.Field;&lt;br /&gt;import net.rim.device.api.ui.component.EditField;&lt;br /&gt;import net.rim.device.api.ui.component.BasicEditField;&lt;br /&gt;import net.rim.device.api.system.EncodedImage;&lt;br /&gt;import net.rim.device.api.system.Bitmap;&lt;br /&gt;import net.rim.device.api.system.Display;&lt;br /&gt;import net.rim.device.api.ui.Graphics;&lt;br /&gt;import net.rim.device.api.system.Characters;&lt;br /&gt;import net.rim.device.api.math.Fixed32;&lt;br /&gt;import net.rim.device.api.ui.DrawStyle;&lt;br /&gt;import net.rim.device.api.ui.Font;&lt;br /&gt;&lt;br /&gt;public class CustomTextBox extends Manager&lt;br /&gt;{&lt;br /&gt;    /**&lt;br /&gt;     * Default margins&lt;br /&gt;     */&lt;br /&gt;    private final static int DEFAULT_LEFT_MARGIN = 10;&lt;br /&gt;    private final static int DEFAULT_RIGHT_MARGIN = 10;&lt;br /&gt;    private final static int DEFAULT_TOP_MARGIN = 5;&lt;br /&gt;    private final static int DEFAULT_BOTTOM_MARGIN = 5;&lt;br /&gt;    &lt;br /&gt;    /**&lt;br /&gt;     * Default paddings&lt;br /&gt;     */&lt;br /&gt;    private final static int DEFAULT_LEFT_PADDING = 10;&lt;br /&gt;    private final static int DEFAULT_RIGHT_PADDING = 10;&lt;br /&gt;    private final static int DEFAULT_TOP_PADDING = 5;&lt;br /&gt;    private final static int DEFAULT_BOTTOM_PADDING = 5;&lt;br /&gt;    &lt;br /&gt;    /**&lt;br /&gt;     * Margins around the text box&lt;br /&gt;     */&lt;br /&gt;    private int topMargin = DEFAULT_TOP_MARGIN;&lt;br /&gt;    private int bottomMargin = DEFAULT_BOTTOM_MARGIN;&lt;br /&gt;    private int leftMargin = DEFAULT_LEFT_MARGIN;&lt;br /&gt;    private int rightMargin = DEFAULT_RIGHT_MARGIN;&lt;br /&gt;    &lt;br /&gt;    /**&lt;br /&gt;     * Padding around the text box&lt;br /&gt;     */&lt;br /&gt;    private int topPadding = DEFAULT_TOP_PADDING;&lt;br /&gt;    private int bottomPadding = DEFAULT_BOTTOM_PADDING;&lt;br /&gt;    private int leftPadding = DEFAULT_LEFT_PADDING;&lt;br /&gt;    private int rightPadding = DEFAULT_RIGHT_PADDING;&lt;br /&gt;    &lt;br /&gt;    /**&lt;br /&gt;     * Amount of empty space horizontally around the text box&lt;br /&gt;     */&lt;br /&gt;    private int totalHorizontalEmptySpace = leftMargin + leftPadding &lt;br /&gt;                                       + rightPadding + rightMargin;&lt;br /&gt;    &lt;br /&gt;    /**&lt;br /&gt;     * Amount of empty space vertically around the text box&lt;br /&gt;     */&lt;br /&gt;    private int totalVerticalEmptySpace = topMargin + topPadding &lt;br /&gt;                                  + bottomPadding + bottomMargin;&lt;br /&gt;    &lt;br /&gt;    /**&lt;br /&gt;     * Minimum height of the text box required to display the text entered&lt;br /&gt;     */&lt;br /&gt;    private int minHeight = getFont().getHeight() + totalVerticalEmptySpace;&lt;br /&gt;    &lt;br /&gt;    /**&lt;br /&gt;     * Width of the text box&lt;br /&gt;     */&lt;br /&gt;    private int width = Display.getWidth();&lt;br /&gt;    &lt;br /&gt;    /**&lt;br /&gt;     * Height of the text box&lt;br /&gt;     */&lt;br /&gt;    private int height = minHeight;&lt;br /&gt;    &lt;br /&gt;    /**&lt;br /&gt;     * Background image for the text box&lt;br /&gt;     */&lt;br /&gt;    private EncodedImage backgroundImage;&lt;br /&gt;    &lt;br /&gt;    /**&lt;br /&gt;     * Bitmap version of the backgroundImage.&lt;br /&gt;     * Needed to reduce the calculation overhead incurred by &lt;br /&gt;     * scaling of the given image&lt;br /&gt;     * and derivation of Bitmap from the &lt;br /&gt;     * EncodedImage every time it is needed.&lt;br /&gt;     */&lt;br /&gt;    private Bitmap bitmapBackgroundImage;&lt;br /&gt;    &lt;br /&gt;    /**&lt;br /&gt;     * The core element of this text box&lt;br /&gt;     */&lt;br /&gt;    private EditField editField;&lt;br /&gt;    //private BasicEditField editField;&lt;br /&gt;    &lt;br /&gt;    //private String entireText;&lt;br /&gt;    &lt;br /&gt;    public CustomTextBox()&lt;br /&gt;    {&lt;br /&gt;        // Let the super class initialize the core&lt;br /&gt;        super(0);&lt;br /&gt;        &lt;br /&gt;        // An edit field is the sole field of this manager.&lt;br /&gt;        editField = new EditField();&lt;br /&gt;        //editField = new CustomEditField();&lt;br /&gt;        add(editField);&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public CustomTextBox(EncodedImage backgroundImage)&lt;br /&gt;    {&lt;br /&gt;        this();        &lt;br /&gt;        setBackgroundImage(backgroundImage);&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public void setSize(int width, int height)&lt;br /&gt;    {&lt;br /&gt;        boolean isChanged = false;&lt;br /&gt;        &lt;br /&gt;        if (width &gt; 0 // Ignore invalid width&lt;br /&gt;                &amp;&amp; this.width != width)  &lt;br /&gt;        {&lt;br /&gt;            this.width = width;&lt;br /&gt;            isChanged = true;&lt;br /&gt;        }&lt;br /&gt;        &lt;br /&gt;        // Ignore the specified height if it is less &lt;br /&gt;        // than the minimum height required to display the text.&lt;br /&gt;        if (height &gt; minHeight &amp;&amp; height != this.height)&lt;br /&gt;        {&lt;br /&gt;            this.height = height;&lt;br /&gt;            isChanged = true;&lt;br /&gt;        }&lt;br /&gt;        &lt;br /&gt;        // If width/height has been changed and background image &lt;br /&gt;        // is available, adapt it to the new dimension&lt;br /&gt;        if (isChanged == true &amp;&amp; backgroundImage != null)&lt;br /&gt;        {&lt;br /&gt;            bitmapBackgroundImage = getScaledBitmapImage(backgroundImage, &lt;br /&gt;                                    this.width - (leftMargin+rightMargin),  &lt;br /&gt;                                    this.height - (topMargin+bottomMargin));&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public void setWidth(int width)&lt;br /&gt;    {&lt;br /&gt;        &lt;br /&gt;        if (width &gt; 0 &amp;&amp; width != this.width)&lt;br /&gt;        {&lt;br /&gt;            this.width = width;&lt;br /&gt;            &lt;br /&gt;            // If background image is available, adapt it to the new width&lt;br /&gt;            if (backgroundImage != null)&lt;br /&gt;            {&lt;br /&gt;                bitmapBackgroundImage = getScaledBitmapImage(backgroundImage,&lt;br /&gt;                                        this.width - (leftMargin+rightMargin),&lt;br /&gt;                                        this.height - (topMargin+bottomMargin));&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public void setHeight(int height)&lt;br /&gt;    {&lt;br /&gt;        // Ignore the specified height if it is &lt;br /&gt;        // less than the minimum height required to display the text.&lt;br /&gt;        if (height &gt; minHeight)&lt;br /&gt;        {&lt;br /&gt;            this.height = height;&lt;br /&gt;            &lt;br /&gt;            // If background image is available, adapt it to the new width&lt;br /&gt;            if (backgroundImage != null)&lt;br /&gt;            {&lt;br /&gt;                bitmapBackgroundImage = getScaledBitmapImage(backgroundImage,&lt;br /&gt;                                        this.width - (leftMargin+rightMargin),  &lt;br /&gt;                                        this.height - (topMargin+bottomMargin));&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public void setBackgroundImage(EncodedImage backgroundImage)&lt;br /&gt;    {&lt;br /&gt;        this.backgroundImage = backgroundImage;&lt;br /&gt;        &lt;br /&gt;        // Consider the height of background image in &lt;br /&gt;        // calculating the height of the text box.&lt;br /&gt;        // setHeight() does not ensure that specified &lt;br /&gt;        // height will be in effect, of course, for valid reasons.&lt;br /&gt;        // So derivation of Bitmap image in the setHeight() method is not sure.&lt;br /&gt;        setHeight(backgroundImage.getHeight() + topMargin + bottomMargin);&lt;br /&gt;        if (bitmapBackgroundImage == null)&lt;br /&gt;        {&lt;br /&gt;            bitmapBackgroundImage = getScaledBitmapImage(backgroundImage, &lt;br /&gt;                                    this.width - (leftMargin+rightMargin), &lt;br /&gt;                                    this.height - (topMargin+bottomMargin));&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    /**&lt;br /&gt;     * Generate and return a Bitmap Image scaled according &lt;br /&gt;     * to the specified width and height.&lt;br /&gt;     * &lt;br /&gt;     * @param image     EncodedImage object&lt;br /&gt;     * @param width     Intended width of the returned Bitmap object&lt;br /&gt;     * @param height    Intended height of the returned Bitmap object&lt;br /&gt;     * @return Bitmap object&lt;br /&gt;     */&lt;br /&gt;    private Bitmap getScaledBitmapImage(EncodedImage image, int width, int height)&lt;br /&gt;    {&lt;br /&gt;        // Handle null image&lt;br /&gt;        if (image == null)&lt;br /&gt;        {&lt;br /&gt;            return null;&lt;br /&gt;        }&lt;br /&gt;        &lt;br /&gt;        int currentWidthFixed32 = Fixed32.toFP(image.getWidth());&lt;br /&gt;        int currentHeightFixed32 = Fixed32.toFP(image.getHeight());&lt;br /&gt;        &lt;br /&gt;        int requiredWidthFixed32 = Fixed32.toFP(width);&lt;br /&gt;        int requiredHeightFixed32 = Fixed32.toFP(height);&lt;br /&gt;        &lt;br /&gt;        int scaleXFixed32 = Fixed32.div(currentWidthFixed32, requiredWidthFixed32);&lt;br /&gt;        int scaleYFixed32 = Fixed32.div(currentHeightFixed32, requiredHeightFixed32);&lt;br /&gt;        &lt;br /&gt;        image = image.scaleImage32(scaleXFixed32, scaleYFixed32);&lt;br /&gt;        &lt;br /&gt;        return image.getBitmap();&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;    protected void sublayout(int width, int height)&lt;br /&gt;    {&lt;br /&gt;        // We have one and only child - the edit field. &lt;br /&gt;        // Place it at the appropriate place.&lt;br /&gt;        Field field = getField(0);&lt;br /&gt;        layoutChild(field, this.width - totalHorizontalEmptySpace, &lt;br /&gt;                    this.height - totalVerticalEmptySpace);&lt;br /&gt;        setPositionChild(field, leftMargin+leftPadding, topMargin+topPadding);&lt;br /&gt;        &lt;br /&gt;        setExtent(this.width, this.height);&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public void setTopMargin(int topMargin)&lt;br /&gt;    {&lt;br /&gt;        this.topMargin = topMargin;&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public void setBottomMargin(int bottomMargin)&lt;br /&gt;    {&lt;br /&gt;        this.bottomMargin = bottomMargin;&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;    protected void paint(Graphics graphics)&lt;br /&gt;    {&lt;br /&gt;        // Draw background image if available, otherwise draw a rectangle&lt;br /&gt;        if (bitmapBackgroundImage == null)&lt;br /&gt;        {&lt;br /&gt;            //graphics.drawRect(leftMargin, topMargin, &lt;br /&gt;                                width - (leftMargin+rightMargin), &lt;br /&gt;                                height - (topMargin+bottomMargin));&lt;br /&gt;            graphics.drawRoundRect(leftMargin, topMargin, &lt;br /&gt;                                   width - (leftMargin+rightMargin), &lt;br /&gt;                                   height - (topMargin+bottomMargin), 5, 5);&lt;br /&gt;        }&lt;br /&gt;        else&lt;br /&gt;        {&lt;br /&gt;            graphics.drawBitmap(leftMargin, topMargin, &lt;br /&gt;                                width - (leftMargin+rightMargin), &lt;br /&gt;                                height - (topMargin+bottomMargin),  &lt;br /&gt;                                bitmapBackgroundImage, 0, 0);&lt;br /&gt;        }&lt;br /&gt;        &lt;br /&gt;        // Determine the rightward text that can fit into the visible edit field&lt;br /&gt;        &lt;br /&gt;        EditField ef = (EditField)getField(0);&lt;br /&gt;        String entireText = ef.getText();&lt;br /&gt;        &lt;br /&gt;        boolean longText = false;&lt;br /&gt;        String textToDraw = "";&lt;br /&gt;        Font font = getFont();&lt;br /&gt;        int availableWidth = width - totalHorizontalEmptySpace;&lt;br /&gt;        if (font.getAdvance(entireText) &lt;= availableWidth)&lt;br /&gt;        {&lt;br /&gt;            textToDraw = entireText;&lt;br /&gt;        }&lt;br /&gt;        else&lt;br /&gt;        {&lt;br /&gt;            int endIndex = entireText.length();&lt;br /&gt;            for (int beginIndex = 1; beginIndex &lt; endIndex; beginIndex++)&lt;br /&gt;            {&lt;br /&gt;                textToDraw = entireText.substring(beginIndex);&lt;br /&gt;                if (font.getAdvance(textToDraw) &lt;= availableWidth)&lt;br /&gt;                {&lt;br /&gt;                    longText = true;&lt;br /&gt;                    break;&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        &lt;br /&gt;        if (longText == true)&lt;br /&gt;        {        &lt;br /&gt;            // Force the edit field display only the truncated text&lt;br /&gt;            ef.setText(textToDraw);&lt;br /&gt;          &lt;br /&gt;            // Now let the components draw themselves&lt;br /&gt;            super.paint(graphics);&lt;br /&gt;        &lt;br /&gt;            // Return the text field its original text&lt;br /&gt;            ef.setText(entireText);&lt;br /&gt;        }&lt;br /&gt;        else&lt;br /&gt;        {&lt;br /&gt;            super.paint(graphics);&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public int getPreferredWidth()&lt;br /&gt;    {&lt;br /&gt;        return width;&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public int getPreferredHeight()&lt;br /&gt;    {&lt;br /&gt;        return height;&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    protected boolean keyChar(char ch, int status, int time)&lt;br /&gt;    {&lt;br /&gt;        if (ch == Characters.ENTER)&lt;br /&gt;        {&lt;br /&gt;            return true;&lt;br /&gt;        }&lt;br /&gt;        else&lt;br /&gt;        {&lt;br /&gt;            return super.keyChar(ch, status, time);&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public String getText()&lt;br /&gt;    {&lt;br /&gt;        return ((EditField)getField(0)).getText();&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public void setText(final String text)&lt;br /&gt;    {&lt;br /&gt;        ((EditField)getField(0)).setText(text);&lt;br /&gt;    }    &lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/537260250674612086-4857676367821082337?l=blackberry-tips-bikas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blackberry-tips-bikas.blogspot.com/feeds/4857676367821082337/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2009/07/writing-custom-textbox-in-blackberry.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/4857676367821082337'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/4857676367821082337'/><link rel='alternate' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2009/07/writing-custom-textbox-in-blackberry.html' title='Writing Custom TextBox in Blackberry'/><author><name>Bikas</name><uri>http://www.blogger.com/profile/12419623956407586096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_AOJV3rdHrNA/TOZZ9POdctI/AAAAAAAAAA4/dDYeLz72-Do/S220/S7304974.JPG'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-537260250674612086.post-8192786266573654619</id><published>2009-07-27T21:31:00.000+07:00</published><updated>2009-07-27T21:55:53.389+07:00</updated><title type='text'>Title Bar in Blackberry</title><content type='html'>&lt;br /&gt;&lt;br /&gt;The common approach of setting title in BB scrren is like:&lt;br /&gt;                  setTitle(Field)&lt;br /&gt;&lt;br /&gt;But problem of using setTitle method is the border color that you cannot remove.&lt;br /&gt;This is associated with the device theme.&lt;br /&gt;&lt;br /&gt;Then one have to write his own title bar. &lt;br /&gt;&lt;br /&gt;The following TitleBar has the below properties:&lt;br /&gt;* background color is black&lt;br /&gt;* title image is placed horizontal center&lt;br /&gt;* title bar height is same as the height of the title image&lt;br /&gt;&lt;br /&gt;&lt;table align="center" border="1"&gt;&lt;tr&gt;&lt;td&gt;&lt;pre&gt;&lt;br /&gt;import net.rim.device.api.ui.container.MainScreen;&lt;br /&gt;import net.rim.device.api.ui.component.BitmapField;&lt;br /&gt;import net.rim.device.api.system.Bitmap;&lt;br /&gt;import net.rim.device.api.ui.Color;&lt;br /&gt;import net.rim.device.api.ui.Graphics;&lt;br /&gt;import net.rim.device.api.ui.*;&lt;br /&gt;import net.rim.device.api.ui.component.*;&lt;br /&gt;import net.rim.device.api.ui.container.*;&lt;br /&gt;import net.rim.device.api.system.*;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt; * customized Title Bar&lt;br /&gt; * background color is black (BACKGROUND_COLOR) &lt;br /&gt; * image is placed horizontal center (titleImage)&lt;br /&gt; * title bar height is same as the height of the title image (fieldHeight)&lt;br /&gt; */&lt;br /&gt;public class TitleBar extends Field implements DrawStyle&lt;br /&gt;{&lt;br /&gt;    private int fieldWidth;&lt;br /&gt;    private int fieldHeight;&lt;br /&gt;    private int fontColour;&lt;br /&gt;    private int backgroundColor;&lt;br /&gt;    &lt;br /&gt;    private Bitmap titleImage =  Bitmap.getBitmapResource("topBannerTransparent.png");&lt;br /&gt;    private static final int BACKGROUND_COLOR = 0x00000000;&lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;    public TitleBar() &lt;br /&gt;    {&lt;br /&gt;        super(Field.NON_FOCUSABLE);&lt;br /&gt;        fieldHeight = titleImage.getHeight();&lt;br /&gt;        fieldWidth = Graphics.getScreenWidth();&lt;br /&gt;        &lt;br /&gt;        //background color is black&lt;br /&gt;        backgroundColor = BACKGROUND_COLOR;        &lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public void setBackgroundColour(int _backgroundColour)&lt;br /&gt;    {&lt;br /&gt;        backgroundColor = _backgroundColour;&lt;br /&gt;        invalidate();&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    protected void layout(int width, int height) &lt;br /&gt;    {&lt;br /&gt;        setExtent(getPreferredWidth(), getPreferredHeight());&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public int getPreferredWidth() &lt;br /&gt;    {&lt;br /&gt;        return fieldWidth;&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public int getPreferredHeight() &lt;br /&gt;    {&lt;br /&gt;        return fieldHeight;&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    protected void paint(Graphics graphics) &lt;br /&gt;    {&lt;br /&gt;        &lt;br /&gt;        int w = this.getPreferredWidth();&lt;br /&gt;        int h = this.getPreferredHeight();&lt;br /&gt;        &lt;br /&gt;        graphics.setColor(backgroundColor);&lt;br /&gt;        graphics.fillRect(0, 0, w, h);&lt;br /&gt;        &lt;br /&gt;        int marginX = (w- titleImage.getWidth() ) / 2 ; &lt;br /&gt;        graphics.drawBitmap(marginX, 0, w, h, titleImage, 0, 0);&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/tr&gt;&lt;/td&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;To make this TitleBar treat like original title bar( always visible in the top) the main scrren have to modify like below:&lt;br /&gt;&lt;table align="center" border="1"&gt;&lt;tr&gt;&lt;td&gt;&lt;pre&gt;&lt;br /&gt;import net.rim.device.api.ui.container.MainScreen;&lt;br /&gt;import net.rim.device.api.ui.Graphics;&lt;br /&gt;import net.rim.device.api.ui.*;&lt;br /&gt;import net.rim.device.api.ui.component.*;&lt;br /&gt;import net.rim.device.api.ui.container.*;&lt;br /&gt;import net.rim.device.api.system.*;&lt;br /&gt;&lt;br /&gt;class TitleBarExampleScreen extends MainScreen&lt;br /&gt;{&lt;br /&gt;    TitleBar titleBar = new TitleBar();&lt;br /&gt;    int titleBarHeight = titleBar.getPreferredHeight();&lt;br /&gt;        &lt;br /&gt;    public TitleBarExampleScreen() &lt;br /&gt;    {&lt;br /&gt;        &lt;br /&gt;        super(NO_VERTICAL_SCROLL);&lt;br /&gt;                &lt;br /&gt;        //title Bar added here&lt;br /&gt;        this.add(titleBar);&lt;br /&gt;        &lt;br /&gt;                &lt;br /&gt;        VerticalFieldManager verticalManager = new VerticalFieldManager(Manager.VERTICAL_SCROLL | Manager.VERTICAL_SCROLLBAR )&lt;br /&gt;        {&lt;br /&gt;            public void paint(Graphics graphics)&lt;br /&gt;            {&lt;br /&gt;                graphics.setBackgroundColor(0x00000000);&lt;br /&gt;                graphics.clear();&lt;br /&gt;                super.paint(graphics);&lt;br /&gt;            }&lt;br /&gt;            protected void sublayout( int maxWidth, int maxHeight )&lt;br /&gt;            {&lt;br /&gt;                int displayWidth = Display.getWidth();&lt;br /&gt;                int displayHeight = Display.getHeight() - titleBarHeight;&lt;br /&gt; &lt;br /&gt;                super.sublayout( displayWidth, displayHeight);&lt;br /&gt;                setExtent( displayWidth, displayHeight);&lt;br /&gt;            }&lt;br /&gt;        };&lt;br /&gt;        &lt;br /&gt;        //now add everything in the verticalManager&lt;br /&gt;        verticalManager.add(new LabelField("Test Label"));&lt;br /&gt;        verticalManager.add(new ButtonField("Test Button"));&lt;br /&gt;        &lt;br /&gt;        //and at last add  verticalManager in scereen   &lt;br /&gt;        this.add(verticalManager);&lt;br /&gt;    }&lt;br /&gt;} &lt;br /&gt;&lt;/pre&gt;&lt;/tr&gt;&lt;/td&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/537260250674612086-8192786266573654619?l=blackberry-tips-bikas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blackberry-tips-bikas.blogspot.com/feeds/8192786266573654619/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2009/07/write-title-bar-in-blackberry.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/8192786266573654619'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/8192786266573654619'/><link rel='alternate' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2009/07/write-title-bar-in-blackberry.html' title='Title Bar in Blackberry'/><author><name>Bikas</name><uri>http://www.blogger.com/profile/12419623956407586096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_AOJV3rdHrNA/TOZZ9POdctI/AAAAAAAAAA4/dDYeLz72-Do/S220/S7304974.JPG'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-537260250674612086.post-7464750110507146567</id><published>2009-07-23T21:58:00.000+07:00</published><updated>2009-07-23T22:13:03.874+07:00</updated><title type='text'>How to Read, Write and Copy file in Blackberry</title><content type='html'>It is very common feature in Blackberry to read/write/copy file programatically in BlackBerry.&lt;br /&gt;&lt;br /&gt;Read file in the SDCard in the following way:&lt;br /&gt;&lt;table border="1"&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;InputStream inputStream = null;&lt;br /&gt;FileConnection fileConnection = (FileConnection) Connector.open( "file:///SDCard/testfile.txt");&lt;br /&gt;if (fileConnection.exists()) &lt;br /&gt;{&lt;br /&gt;    inputStream = fconn.openInputStream();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();&lt;br /&gt;byte[] buffer = new byte[BUFFER_SIZE];&lt;br /&gt;while (true) {&lt;br /&gt;    int bytesRead = inputStream.read( buffer, 0, BUFFER_SIZE );&lt;br /&gt;    if (bytesRead == -1)&lt;br /&gt;        break;&lt;br /&gt;    byteArrayOutputStream.write( buffer, 0, bytesRead );&lt;br /&gt;}&lt;br /&gt;byteArrayOutputStream.flush();&lt;br /&gt;byte[] result = byteArrayOutputStream.toByteArray();&lt;br /&gt;byteArrayOutputStream.close();&lt;br /&gt;String resultString = new String(result);&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;Write/Save file in SDCard in the following way:&lt;br /&gt;&lt;table border="1"&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;FileConnection fc = (FileConnection) Connector.open(System.getProperty("file:///SDCard/"+"fileName.txt"),Connector.READ_WRITE);&lt;br /&gt;if(!fc.exists())&lt;br /&gt;{&lt;br /&gt;   fc.create();&lt;br /&gt;}&lt;br /&gt;OutputStream os =fc.openOutputStream();&lt;br /&gt;os.write("Test");&lt;br /&gt;os.close();&lt;br /&gt;fc.close()&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Copy file in SDCard in the following way:&lt;br /&gt;&lt;table border="1"&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;        public static void copyFile(String srFile, String dtFile)&lt;br /&gt; {&lt;br /&gt;  try&lt;br /&gt;  {&lt;br /&gt;   FileConnection f1;&lt;br /&gt;   FileConnection f2;&lt;br /&gt;   &lt;br /&gt;   f1 = (FileConnection) Connector.open(srFile,Connector.READ_WRITE);&lt;br /&gt;   f2 = (FileConnection) Connector.open(dtFile,Connector.READ_WRITE);&lt;br /&gt;   if(!f2.exists()) // if  file does not exists , create a new one&lt;br /&gt;   {&lt;br /&gt;    f2.create();&lt;br /&gt;   }&lt;br /&gt;   InputStream is = f1.openInputStream();&lt;br /&gt;   OutputStream os =f2.openOutputStream();&lt;br /&gt;   byte[] buf = new byte[1024];&lt;br /&gt;   int len;&lt;br /&gt;   while ((len = is.read(buf)) &gt; 0)&lt;br /&gt;   {&lt;br /&gt;          os.write(buf, 0, len);&lt;br /&gt;   }&lt;br /&gt;     is.close();&lt;br /&gt;     os.close();&lt;br /&gt;  }&lt;br /&gt;  catch(IOException e)&lt;br /&gt;  {&lt;br /&gt;              &lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;Also check this &lt;a href="http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800620/What_Is_-_Supported_System.getProperty_keys?nodeid=852419&amp;vernum=0"&gt;link&lt;/a&gt; for more information about file path.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/537260250674612086-7464750110507146567?l=blackberry-tips-bikas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blackberry-tips-bikas.blogspot.com/feeds/7464750110507146567/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2009/07/how-to-read-write-and-copy-file-in.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/7464750110507146567'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/7464750110507146567'/><link rel='alternate' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2009/07/how-to-read-write-and-copy-file-in.html' title='How to Read, Write and Copy file in Blackberry'/><author><name>Bikas</name><uri>http://www.blogger.com/profile/12419623956407586096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_AOJV3rdHrNA/TOZZ9POdctI/AAAAAAAAAA4/dDYeLz72-Do/S220/S7304974.JPG'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-537260250674612086.post-1960140887951848664</id><published>2009-07-23T21:44:00.000+07:00</published><updated>2009-07-23T21:53:13.602+07:00</updated><title type='text'>How to Place a Field Vertically and Horizontally center in the Blackberry Screen</title><content type='html'>For placing a Field (for example HorizontalFieldManager) in center of the screen simple setting margin will do the trick.&lt;br /&gt;&lt;br /&gt;Here is an example of placing a HorizontalFieldManager in the center.&lt;br /&gt;&lt;br /&gt;&lt;table border="1"&gt;&lt;tr&gt;&lt;td&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;        HorizontalFieldManager hfm = new HorizontalFieldManager();    &lt;br /&gt;       &lt;br /&gt;        LabelField testLabel1 = new LabelField( "Test Label1");    &lt;br /&gt;        LabelField testLabel2 = new LabelField( "Test Label2");&lt;br /&gt;        hfm.add(testLabel1);&lt;br /&gt;        hfm.add(testLabel2);&lt;br /&gt;        &lt;br /&gt;        int leftEmptySpace = (Display.getWidth() - hfm.getPreferredWidth()) / 2;&lt;br /&gt;        int topEmptySpace = (Display.getHeight() - hfm.getPreferredHeight()) / 2;&lt;br /&gt;        hfm.setMargin(topEmptySpace, 0, 0, leftEmptySpace);&lt;br /&gt;        &lt;br /&gt;        //now add this manager to MainScreen&lt;br /&gt;        this.add(hfm); &lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt; &lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/537260250674612086-1960140887951848664?l=blackberry-tips-bikas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blackberry-tips-bikas.blogspot.com/feeds/1960140887951848664/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2009/07/how-to-place-field-vertically-and.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/1960140887951848664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/1960140887951848664'/><link rel='alternate' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2009/07/how-to-place-field-vertically-and.html' title='How to Place a Field Vertically and Horizontally center in the Blackberry Screen'/><author><name>Bikas</name><uri>http://www.blogger.com/profile/12419623956407586096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_AOJV3rdHrNA/TOZZ9POdctI/AAAAAAAAAA4/dDYeLz72-Do/S220/S7304974.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-537260250674612086.post-3053924820950916198</id><published>2009-07-23T01:33:00.000+07:00</published><updated>2009-07-23T01:41:06.117+07:00</updated><title type='text'>How to set Background color of Blackberry Screen</title><content type='html'>For setting background color in Blackberry screen we need to do the following.&lt;br /&gt;&lt;br /&gt;Disable Vertical scrolling of the main screen.&lt;br /&gt;&lt;br /&gt;Now create a VerticalFieldManager with vertical scroll enabled. This will be the main manger where screen component have to add. Set the width and height of this manager as Screen width and height by overriding sublayout() method.&lt;br /&gt;And override paint() method to set backgroung color&lt;br /&gt;&lt;br /&gt;Here is the example code with above implemented.&lt;br /&gt;&lt;table style="width: 345px; height: 566px;" align="center" border="1"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;import net.rim.device.api.ui.*;&lt;br /&gt;import net.rim.device.api.ui.component.*;&lt;br /&gt;import net.rim.device.api.ui.container.*;&lt;br /&gt;import net.rim.device.api.system.*;&lt;br /&gt;&lt;br /&gt;class TestScreen extends MainScreen{&lt;br /&gt;&lt;br /&gt;    private VerticalFieldManager verticalManager;&lt;br /&gt;    private HorizontalFieldManager hrzManager;&lt;br /&gt;    &lt;br /&gt;    TestScreen() &lt;br /&gt;    {    &lt;br /&gt;        super(NO_VERTICAL_SCROLL);&lt;br /&gt;&lt;br /&gt;        //rather than  adding component &lt;br /&gt;        //in the mainScreen add components&lt;br /&gt;        //in this verticalManager and then&lt;br /&gt;        //add this manager to mainScreen  &lt;br /&gt;        verticalManager = new VerticalFieldManager(&lt;br /&gt;                          Manager.VERTICAL_SCROLL | &lt;br /&gt;                          Manager.VERTICAL_SCROLLBAR)&lt;br /&gt;        {&lt;br /&gt;            public void paint(Graphics graphics)&lt;br /&gt;            {&lt;br /&gt;               //blue &lt;br /&gt;               graphics.setBackgroundColor(0x000000ff);&lt;br /&gt;               graphics.clear();&lt;br /&gt;               super.paint(graphics);&lt;br /&gt;            }            &lt;br /&gt;            protected void sublayout( int maxWidth, int maxHeight )&lt;br /&gt;            {&lt;br /&gt;               int width = Display.getWidth();&lt;br /&gt;               int height = Display.getHeight();&lt;br /&gt;               super.sublayout( width, height);&lt;br /&gt;               setExtent( width, height);&lt;br /&gt;            }&lt;br /&gt;        };&lt;br /&gt;     &lt;br /&gt;        ButtonField button1 = new ButtonField("Button1");&lt;br /&gt;        ButtonField button2 = new ButtonField("Button2");&lt;br /&gt;        ButtonField button3 = new ButtonField("Button3");&lt;br /&gt;        ButtonField button4 = new ButtonField("Button4");&lt;br /&gt;        ButtonField button5 = new ButtonField("Button5");&lt;br /&gt;        &lt;br /&gt;        verticalManager.add(button1);&lt;br /&gt;        verticalManager.add(button2);&lt;br /&gt;        verticalManager.add(button3);&lt;br /&gt;        verticalManager.add(button4);&lt;br /&gt;        verticalManager.add(button5);&lt;br /&gt;        this.add(verticalManager);&lt;br /&gt;        &lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Also have a look at this &lt;a href="http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800505/800256/How_to_-_Change_the_background_color_of_a_screen.html?nodeid=800335&amp;vernum=0"&gt;KnowledgeBase Article&lt;/a&gt; for getting better idea.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;/br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/537260250674612086-3053924820950916198?l=blackberry-tips-bikas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blackberry-tips-bikas.blogspot.com/feeds/3053924820950916198/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2009/07/for-setting-background-color-in.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/3053924820950916198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/3053924820950916198'/><link rel='alternate' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2009/07/for-setting-background-color-in.html' title='How to set Background color of Blackberry Screen'/><author><name>Bikas</name><uri>http://www.blogger.com/profile/12419623956407586096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_AOJV3rdHrNA/TOZZ9POdctI/AAAAAAAAAA4/dDYeLz72-Do/S220/S7304974.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-537260250674612086.post-334503571895344503</id><published>2009-07-23T00:20:00.000+07:00</published><updated>2009-07-23T01:20:12.845+07:00</updated><title type='text'>How to set Background Image in Blackberry</title><content type='html'>&lt;p&gt;For setting image in the background of the Blackberry screen we need to do the following.&lt;/p&gt;&lt;p&gt;First create a VerticalFieldManager and override the paint method of that manager and then draw Bitmap inside paint() method with the device width and height. Disable vertical scrolling of this manager.&lt;/p&gt;&lt;p&gt;Now create another VerticalFieldManager with vertical scroll enabled. This will be the main manger where screen component have to add. Set the width and height of this manager as Screen width and height by overriding sublayout() method.&lt;/p&gt;&lt;br /&gt;Here is the example code with above implemented.&lt;br /&gt;&lt;table align="left" border="line"&gt;&lt;tr&gt;&lt;td&gt;&lt;pre&gt;&lt;br /&gt;import net.rim.device.api.ui.*;&lt;br /&gt;import net.rim.device.api.ui.component.*;&lt;br /&gt;import net.rim.device.api.ui.container.*;&lt;br /&gt;import net.rim.device.api.system.*;&lt;br /&gt;&lt;br /&gt;public class TestScreen extends MainScreen&lt;br /&gt;{&lt;br /&gt;    &lt;br /&gt;    private VerticalFieldManager mainManager;&lt;br /&gt;    private VerticalFieldManager subManager;&lt;br /&gt;    private Bitmap _backgroundBitmap = Bitmap.getBitmapResource&lt;br /&gt;                                              ("sunset.png");       &lt;br /&gt;    private int deviceWidth = Display.getWidth();&lt;br /&gt;    private int deviceHeight = Display.getHeight();&lt;br /&gt;    &lt;br /&gt;    public TestScreen() &lt;br /&gt;    {&lt;br /&gt;        super(NO_VERTICAL_SCROLL);&lt;br /&gt;        &lt;br /&gt;        //this manager is used for the static background image&lt;br /&gt;        mainManager = new VerticalFieldManager(&lt;br /&gt;                          Manager.NO_VERTICAL_SCROLL | &lt;br /&gt;                          Manager.NO_VERTICAL_SCROLLBAR )&lt;br /&gt;        {            &lt;br /&gt;            public void paint(Graphics graphics)&lt;br /&gt;            {&lt;br /&gt;                graphics.clear();&lt;br /&gt;                graphics.drawBitmap(0, 0, deviceWidth,            &lt;br /&gt;                         deviceHeight, _backgroundBitmap, 0, 0);                 &lt;br /&gt;                super.paint(graphics);&lt;br /&gt;            }            &lt;br /&gt;        };&lt;br /&gt;        &lt;br /&gt;        //this manger is used for adding the componentes&lt;br /&gt;        subManager = new VerticalFieldManager(&lt;br /&gt;                         Manager.VERTICAL_SCROLL |  &lt;br /&gt;                         Manager.VERTICAL_SCROLLBAR )&lt;br /&gt;        {&lt;br /&gt;            protected void sublayout(int maxWidth, int maxHeight)&lt;br /&gt;            {&lt;br /&gt;                int displayWidth = deviceWidth;&lt;br /&gt;                int displayHeight = deviceHeight;&lt;br /&gt; &lt;br /&gt;                super.sublayout( displayWidth, displayHeight);&lt;br /&gt;                setExtent( displayWidth, displayHeight);&lt;br /&gt;            }&lt;br /&gt;        };&lt;br /&gt;                &lt;br /&gt;        /// add your component to this subManager       &lt;br /&gt;        subManager.add(new ButtonField("Test Button"));&lt;br /&gt;        /////////////////////////////////////////&lt;br /&gt;        &lt;br /&gt;        //add subManager over the mainManager&lt;br /&gt;        mainManager.add(subManager);&lt;br /&gt;        &lt;br /&gt;        //finally add the mainManager over the screen&lt;br /&gt;        this.add(mainManager);   &lt;br /&gt;    }  &lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;/br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/537260250674612086-334503571895344503?l=blackberry-tips-bikas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blackberry-tips-bikas.blogspot.com/feeds/334503571895344503/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2009/07/how-to-set-image-in-blackberry.html#comment-form' title='23 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/334503571895344503'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/334503571895344503'/><link rel='alternate' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2009/07/how-to-set-image-in-blackberry.html' title='How to set Background Image in Blackberry'/><author><name>Bikas</name><uri>http://www.blogger.com/profile/12419623956407586096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_AOJV3rdHrNA/TOZZ9POdctI/AAAAAAAAAA4/dDYeLz72-Do/S220/S7304974.JPG'/></author><thr:total>23</thr:total></entry><entry><id>tag:blogger.com,1999:blog-537260250674612086.post-7368788500848457184</id><published>2009-07-22T16:58:00.000+07:00</published><updated>2009-07-22T18:13:56.440+07:00</updated><title type='text'>HelloWorld in BlackBerry</title><content type='html'>Before starting anything its became a tradition to start with HelloWorld.&lt;br /&gt;Here list of &lt;a href="http://www.scriptol.com/programming/hello-world.php"&gt;HelloWorld programming&lt;/a&gt; in 200 different languages.&lt;br /&gt;&lt;br /&gt;So to maintain the tradition we are going to write helloWorld in BlackBerry. :)&lt;br /&gt;&lt;br /&gt;1. Open the JDE&lt;br /&gt;&lt;br /&gt;2. Create a new workspace (File -&gt; New -&gt; Workspaces) and name it as helloWorld .&lt;br /&gt;&lt;br /&gt;3. Create a new Project under the helloWorld workspace&lt;br /&gt;File -&gt; New -&gt; Projects                 or&lt;br /&gt;Right click on the helloWorld.jdw (on the left side of the JDE) and click 'Create new Project in&lt;br /&gt;helloWorld.jdw ...'  and name it as helloWorld.&lt;br /&gt;&lt;br /&gt;4. Now create a file under the helloWorld project.&lt;br /&gt;Right click on the helloWorld.jdp and click 'Create new File in&lt;br /&gt;Project ...'  and name it as HelloWorld.java&lt;br /&gt;&lt;br /&gt;5. Paste the following in the HelloWorld.java file.&lt;br /&gt;&lt;br /&gt;&lt;table style="width: 345px; height: 566px;" align="center" border="1"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;import net.rim.device.api.ui.*;&lt;br /&gt;import net.rim.device.api.ui.component.*;&lt;br /&gt;import net.rim.device.api.ui.container.*;&lt;br /&gt;import net.rim.device.api.system.*;&lt;br /&gt;&lt;br /&gt;class HelloWorld extends UiApplication&lt;br /&gt;{&lt;br /&gt;&lt;div style="text-align: left;"&gt;        public HelloWorld()&lt;br /&gt;&lt;/div&gt;        {&lt;br /&gt;        super();&lt;br /&gt;      &lt;br /&gt;        /// creating mainScreen to diaply hellowrld&lt;br /&gt;        MainScreen helloWorldScreen = new MainScreen();&lt;br /&gt;        LabelField lbl = new LabelField("Hello World");&lt;br /&gt;        helloWorldScreen.add(lbl);&lt;br /&gt;&lt;br /&gt;        //pushing that screen to Display&lt;br /&gt;        this.pushScreen(helloWorldScreen);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public static void main(String[] args)&lt;br /&gt;    {&lt;br /&gt;         HelloWorld helloWorld  = new HelloWorld();&lt;br /&gt;         helloWorld.enterEventDispatcher();&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;6. Now build and Run the project (Build -&gt; Build All and Run)&lt;br /&gt;&lt;br /&gt;7. Go to the home screen of the simulator and click the application named helloWorld.&lt;br /&gt;&lt;br /&gt;8. Enjoy HelloWorld in the BB Simulator.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/537260250674612086-7368788500848457184?l=blackberry-tips-bikas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blackberry-tips-bikas.blogspot.com/feeds/7368788500848457184/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2009/07/helloworld-in-blackberry.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/7368788500848457184'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/7368788500848457184'/><link rel='alternate' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2009/07/helloworld-in-blackberry.html' title='HelloWorld in BlackBerry'/><author><name>Bikas</name><uri>http://www.blogger.com/profile/12419623956407586096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_AOJV3rdHrNA/TOZZ9POdctI/AAAAAAAAAA4/dDYeLz72-Do/S220/S7304974.JPG'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-537260250674612086.post-1058713843919761293</id><published>2009-07-22T15:23:00.000+07:00</published><updated>2009-07-29T13:22:33.762+07:00</updated><title type='text'>Create the Environment for BlackBerry development</title><content type='html'>Before starting  HelloWorld we need to create the environment for BlackBerry development.&lt;br /&gt;&lt;br /&gt;Blackberry applications can be developed using Blackberry JDE, Eclipse Plugin, Netbeans plugin and Visual Studio Plugin.&lt;br /&gt;&lt;br /&gt;I use Blackberry JDE for my development. I prefer this because this is provided by the RIM.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;We have to follow the following steps for making our PC to start HelloWorld using BB JDE.&lt;br /&gt;&lt;br /&gt;1. Before staring it is very important to choose the JDE. Have a look at this &lt;a href="http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800738/800901/What_Is_-_Appropriate_version_of_the_BlackBerry_JDE.html?nodeid=1287169&amp;amp;vernum=0"&gt;KnowledgeBase article.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2. For example you chosen &lt;a href="https://www.blackberry.com/Downloads/contactFormPreload.do?code=DC727151E5D55DDE1E950767CF861CA5&amp;amp;dl=3FC040AED3A9E7AD55ECAC2105F9C435"&gt;JDE 4.6.0.&lt;/a&gt;&lt;br /&gt;You can &lt;a href="http://na.blackberry.com/eng/developers/javaappdev/javadevenv.jsp"&gt;download&lt;/a&gt; any other version from here.&lt;br /&gt;&lt;br /&gt;3. Now Install the "BlackBerry_JDE_4.6.0.exe" that you downloaded&lt;br /&gt;&lt;br /&gt;4. Install any latest JDK (ex: jdk-6u5-windows-i586-p.exe)&lt;br /&gt;&lt;br /&gt;5. Update your environment variable.&lt;br /&gt;  Control Panel -&gt; System -&gt; Environment variables -&gt; click &lt;span style="font-weight: bold;"&gt;path &lt;/span&gt;in the system variables -&gt; &lt;br /&gt;  Edit. Now add the following  in Variable value ; each with a semicolon in the end&lt;br /&gt;  a) C:\Program Files\Java\jdk1.6.0_05\bin&lt;p&gt;    b) C:\Program Files\Java\jre1.6.0_05\bin&lt;/p&gt;&lt;p&gt;    c) C:\Program Files\Research In Motion\BlackBerry JDE 4.6.0\bin&lt;/p&gt;&lt;p&gt;6. Restart your PC or simply the logoff will do.&lt;/p&gt;&lt;p&gt;Now we are ready to start HelloWorld in Blackberry :)&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/537260250674612086-1058713843919761293?l=blackberry-tips-bikas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blackberry-tips-bikas.blogspot.com/feeds/1058713843919761293/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2009/07/create-environment-for-blackberry.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/1058713843919761293'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/537260250674612086/posts/default/1058713843919761293'/><link rel='alternate' type='text/html' href='http://blackberry-tips-bikas.blogspot.com/2009/07/create-environment-for-blackberry.html' title='Create the Environment for BlackBerry development'/><author><name>Bikas</name><uri>http://www.blogger.com/profile/12419623956407586096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_AOJV3rdHrNA/TOZZ9POdctI/AAAAAAAAAA4/dDYeLz72-Do/S220/S7304974.JPG'/></author><thr:total>6</thr:total></entry></feed>
