Diagonal in blackberry java gradient

Hi im trying to draw shapes with Diagonal gradient, but the problems is its gradient dosent seem to agree. Here's the code I did. Can I ask for suggestions on how to make this tnx in advance.

Protected Sub paint (figure net.rim.device.api.ui.Graphics) {}
int width = 300;
int height = 300;
int [] xPts = {0, width, width, 0};
int [] yPts is {0, 0, height, height};.
int [] colors = {}
Color.BLACK, Color.BLACK, Color.WHITE, Color.BLACK
};
graphics.drawShadedFilledPath (xPts, yPts, null, null);
}

Try:

int [] colors = {}
Color.BLACK, Color.GREY, Color.WHITE, Color.GREY

};

Tags: BlackBerry Developers

Similar Questions

  • How to install the BlackBerry Java application in BlackBerry 10 Dev alpha

    Hello

    Does anyone know how to install the BlackBerry Java application in BlackBerry 10 Dev Alpha. I am able to wear an Android app in worms BlackBerry Dev Alpha 10. But there is no idea to install application developed with BlackBerry Java SDK 7.1 in verse 10 BlackBerry Dev alpha.

    Thanks in advance.

    I guess what pradeep_ch is correct,

    FYI,.

    http://supportforums.BlackBerry.com/T5/Java-development/DevCon-update-BB-Java-is-dead-no-Java-suppor...

    Thank you

  • BlackBerry Java plugin for Tour 9630

    I install different versions of software from the "BlackBerry Update site" in the «assistance, updates of software...» "in Eclipse.

    This way, I installed 4.5.0, 4.6.0 4.6.1, 4.7.0 5.0.0 etc, but I am not able to find 4.7.1 which is necessary to obtain the 9630 Simulator and get it integrated into Eclipse.

    Any ideas how to do this?

    There is no version 4.7.1 BlackBerry Java SDK.  You can download a simulator BlackBerry Smartphone running the version 4.7.1 here: http://na.blackberry.com/eng/developers/resources/simulators.jsp

    Once installed, you can use within Eclipse.

  • Date time format BlackBerry java application

    Hi all

    I'll have a Date format time as ' 2013-10 - 09T 12: 45:00 + 05:30 '. How can I convert in ' hh: mm a "or" hh: mm a "in my Blackberry Java Application.

    Thank you and best regards.

    I will not be able to solve this problem using techniques integrated... In any case I analyzed it manually...

    Thankng you all for you answer!

  • What is Blackberry Bis push Service different development of BlackBerry Java development?

    Hello

    I develop applications using blackberry java development. I want to develop an application that uses blackberry push service, pls suggest is different from the java development?

    What do you mean with 'different '?
    BIS push uses the infrastructure of the RIM and is a service, it is independent of the programming language.

    You can use BIS push with java bb, you can use it with webworks/html5, and you can also use it on bb10 with c ++.

  • BlackBerry Java plug-in for Eclipse plugin vs for websphere studio device developments

    Hello world

    I am at a loss, because I can not even begin to help in the development of websphere studio device, because I can't find any plug-in for it, for my body I have to use this IDE which is Websphere studio as an IDE device development to develop my app for BlackBerry 8310, so I look to find how to test my java application measures  , so I find BlackBerry Java plug-in for Eclipse ", my question is are there any plugin fo Wbsphere IDE, and there is a way to use the same plug-in of eclipse for me.

    Thank you;

    can't answer the first question that I don't ever use websphere - if you want to use it, you will find a way, if not I suggest you switch to eclipse.

    Yes, you must generate the Cod. It cannot be run without generating the binary file.

    FYI: we use eclipse as editor-in-Chief and the jde as a tool to build test /.

  • BlackBerry Java SDK v6.0.0 what operating system on the device?

    I installed BlackBerry Java SDK v6.0.0 and the 1.1.2.201004161203 - 16 BlackBerry Java plug-in for Eclipse.

    What Op system will run applications compiled and delivered with the Java SDK v6.0.0?

    It's just a ready version for OS v.6 or Apps running on OS v.5.x?

    I've compiled packed etc and tried to load my file ALX on my BB I get;

    "No applications can be found. Your file may contain applications that already exist... "etc".

    Google has been, and it was suggested that I uninstalled BB Desktop, cleanregistry etc., downloaded the latest version. Done, but no joy.

    Thank you.

    all devices are compatible, but not upward.

    in other words, an application compiled with os 6 will work only on the OS6 devices (simulators).

    If you compile with 4.2.1 all devices with OS 4.2.1 or higher, for example OS 6, run.

  • BlackBerry Java plug-in v5.0.0.25

    Installed BlackBerry Java SDK v6.0.0

    On the instructions page, it says;

    The installed software tab, check if you have the latest versions:

    • BlackBerry Java SDK v6.0.0
    • BlackBerry Java plug-in v5.0.0.25

    I have BlackBerry Java plug-in 1.1.2.201004161203 - 16.

    Does not say that there is an v.5.0.0.25 update!

    Am I missing something?

    Thank you...

    I have compiled etc and I tried to load my file ALX on my BB I get now.

    "No applications can be found. Your file may contain applications that already exist... "etc".

    Have deleted the previous version, built with the SDK 5.x.

    Don't have not find this before.

    Is the SDK 6.x requires the next OS 6.x?

  • Analyze and display a text string that has HTML tags on blackberry java screen

    Hello world

    I have a string of text that has some HTML in there. I want to display this text string to the screen of blackberry java by analyzing these HTML tags.

    Here is the text of the string.


    Large bright digital display
    Six output Modes
    Automatic test systems

  • Sound signals

  • Discrete outputs
  • Isolated circuit
  •  
  • Digital error detection
  • Thanks in advance!

    Vinay.


    Hello

    Displag a String with HTML tags problem solved!

    Here is the code snippet.

    BrowserField _bf11 = new BrowserField();
    prodDescManager.add (_bf11);

    String Highlight2 ="
    Seat and head radiolucent
    Manual control for instant CPR
    IV pole;

    _bf11.displaycontent (Highlight2, "http://localhost");

    Vinay.

  • How to work Blackberry Java or Webworks with PHP?

    Hi I'm new in the development of a Blackberry Application.

    I would like to ask?

    How can I pass a value of PHP for blackberry app?

    Example:

    When (Blackberry application) click a button and it will automatically receive a (field) in the value of PHP / Web site.

    If the site passes a value as (name: Harry) and then the area of the blackberry application will appear 'Harry' in the text box. Thank you

    And also we must I use Blackberry Webworks or Blackberry Java? I can so able to create logic from above. Thank you so much support forums blackberry developers

    From: Kiheyt

    In order to obtain data from a web service (PHP or any other language), you must first create a connection to your server.

    The connection and the transferred data are generally independent of the server (especially when it comes to HTTP) as the connection is based on known standards and data is transferred in the form of bytes (which are numbers o that it doesn't really matter what language you are coding).

    In Blackberry you can create a connection to the server to retrieve data or connect 'push', in this case, your client is still connected and the server sends notifications to the client.

    To learn more about the first option, just look at 'http connection' in the forum (there are about 1000 different threads).

    For more information on the second option, search for "push" or "push notifications" and have a look here:

    http://supportforums.BlackBerry.com/T5/BlackBerry-push-development/sample-applications-demonstrating...

    As for the second question, I don't have enough information to help you. Maybe if you would give details on your request, we will help you even more.

    I hope this helps,

    E.

  • where to get the guide in PDF for Blackberry Java Development

    Hi all

    I want to get any good guide PDf for blackberry Java development which five will be me good knowledge on the development of java blackberry.

    Thank you all

    http://docs.BlackBerry.com/en/developers/?usertype=21

    and

    http://docs.BlackBerry.com/en/developers/subcategories/?usertype=21&category=Java+development+guides...

  • How to develop the Rss reader for Blackberry java?

    HII,

    This is my first post in this forum, I'm new mobile app, can everyone, how to develop the Rss aggregator for java Blackberry?

    I've attached a zip file which would be useful for you, check it out it's a RSS reader coll, I used some of the techniques for my application, please mark as solution, thank you.

  • Link Web for BlackBerry Java 6.0 and 5 SDK

    Hi, I want to ask on the link for JRE 6 SDK Update.

    I just downloaded the plugin Eclipse for Blackberry here:

    https://developer.BlackBerry.com/Java/download/Eclipse/

    Eclipse, I'm here now don't have JRE 7.1.0

    But the examples I've had to learn java requires JRE 6.

    I try to add: http://www.blackberry.com/go/eclipseUpdate/3.6/java but the result is not found software

    Can someone help me get this update link?

    I assume that you got your 7.1 download from this page:

    https://developer.BlackBerry.com/Java/download/Eclipse/

    On this page there is a link that says:

    Add the BlackBerry Update site in Eclipse (Windows)

    If you click on that it tells you what to do.

    I don't know where you got this from:

    http://www.BlackBerry.com/go/eclipseUpdate/3.6/Java

    But wherever it is, can update you to point people on the download page and not the link - update site may well change again.

    Please come back to us if this does not answer your question.

  • How to change the width of editfield in blackberry java

    Hi, blackberry has,

    I want to change the width of editfield... can someone tell me how I can do

    Hi Ludovic,.

    use TableLayoutManager and adjust the width of the field (based on no. added columns) for your screen.

    I don't get your condition, but if you want to insert fields so that it will adjust the space then use RoundedPanel and you can add a tablelayoutmanager to this Panel.

    /*
     * RoundedPanel.java
     *
     * © , 2003-2008
     * Confidential and proprietary.
     */
    
    import net.rim.device.api.ui.Field;
    import net.rim.device.api.ui.Color;
    import net.rim.device.api.ui.Manager;
    import net.rim.device.api.ui.Graphics;
    import net.rim.device.api.ui.container.VerticalFieldManager;
    import net.rim.device.api.system.Display;
    
    /**
     *
     */
    public class RoundedPanel extends VerticalFieldManager {
        private int _heightBtmIncr = 0;
        private int color = Color.WHITE;
        private String str = null;
    
        public RoundedPanel() {
            super(Manager.VERTICAL_SCROLL);
        }
    
        public RoundedPanel(int heightBtmIncr) {
            super(Manager.VERTICAL_SCROLL);
            _heightBtmIncr = heightBtmIncr;
        }
    
        public RoundedPanel(int color , String str) {
    
            super(Manager.VERTICAL_SCROLL);
            this.str = str;
            this.color = color;
        }
    
        public void paint(Graphics g) {
            g.setBackgroundColor(Color.LIGHTGREY);
            int initialColor = g.getColor();
            g.setColor(Color.LIGHTGREY);
            g.fillRect(0, 0, this.getPreferredWidth(), this.getHeight());
            g.setColor(color);
            g.fillRoundRect(3, 3, this.getPreferredWidth() - 6, this.getHeight() - 6, 17, 17);
            g.setColor(Color.DARKGRAY);
            g.drawRoundRect(3, 3, this.getPreferredWidth() - 6, this.getHeight() - 6, 17, 17);
            g.setColor(initialColor);
            super.paint(g);
        }
    
        public void sublayout(int maxWidth, int maxHeight) {
            super.sublayout(maxWidth, Integer.MAX_VALUE);
            int fieldCount = getFieldCount();
            int x = 12;
            int y = 10;
            Field child = null;
    
            for (int i = 0; i < fieldCount; i++) {
                child = this.getField(i);
                setPositionChild(child, x, y);
                layoutChild(child, getFieldWidth(child), Integer.MAX_VALUE);
                int childHeight = getFieldHeight(child);
                y = y + childHeight;
            }
    
            this.setExtent(getPreferredWidth(), Math.max(y, getPreferredHeight()));
            setVirtualExtent(getPreferredWidth(), Math.max(y, getPreferredHeight()));
        }                  
    
        private int getFieldWidth(Field f) {
            return Math.min(Math.max(Math.max(f.getContentWidth(), f.getWidth()), f.getPreferredWidth()), this.getPreferredWidth() - 12);
        }
    
        private int getFieldHeight(Field f) {
            return Math.max(Math.max(f.getContentHeight(), f.getHeight()), f.getPreferredHeight());
        }
    
        public int getPreferredWidth() {
            return Display.getWidth();
        }
    
        public int getPreferredHeight() {
            int height = 6;
            int iNumFields = getFieldCount();
            for (int i = 0; i < iNumFields; i++) {
                height += getFieldHeight(getField(i));
            }
    
            return height + _heightBtmIncr + 6;
        }
    
        protected boolean keyDown( int keycode, int status ) {
            invalidate();
    
            return super.keyDown( keycode, status );
        }
    
        protected boolean navigationMovement( int dx, int dy, int status, int time ) {
            invalidate();
    
            return super.navigationMovement( dx, dy, status, time );
        }
    
        protected int moveFocus(int amount, int status, int time) {
            invalidate();
    
            return super.moveFocus(amount, status, time);
        }
    }
    

    Thank you & best regards

    pp

  • Using blackberry Java native methods

    Hi all

    can anyone suggest me how to implement the native methods from java in blackberry apps. In singles, I have a C code, I want to use this code in my blackberry App when I google, I found that java supports the native to consume methods the

    Code of C/C++ in java applications. I want the same thing to do in my blackberry app.

    If someone implementd that kind of technique, so please give the steps or the way how to implement this.

    Verify that this son.

    http://supportforums.BlackBerry.com/T5/Java-development/JNI/m-p/41140

    http://supportforums.BlackBerry.com/T5/Java-development/can-we-use-JNI-Java-native-interface-approac...

Maybe you are looking for