Create a deep round border problem!

Hello

I have a FlowFieldManager with 2 fields inside. I want a rounded border. I tried with

Border border = BorderFactory.createRoundedBorder(new XYEdges(3, 14, 3, 14), Color.WHITE, Border.STYLE_FILLED);
ffm.setBorder(border);

With the above code, I get a soft edge, but I want the curve on the left & right to be rounder. If I increase the value of left & right that is 3, the component is not visible properly. Components are installed using sublayout(), so the width and height of the Manager is stable.

To resolve this problem, I think I had to use graphics.fillRoundRect (). I tried the following code:

ffm = new FlowFieldManager(VerticalFieldManager.FIELD_HCENTER) {
            protected void paint(Graphics g) {
                g.setBackgroundColor(Color.WHITE);
                g.fillRoundRect(1, 3, getWidth(), getHeight(), 10, 5);
            }
        };
        ffm.add(txt);
        ffm.add(btn);
        add(ffm);

With the above code, I see only a black area instead of the Manager of the ffm.

Can someone point out where I'm going wrong and how to fix it?

I can't wait to figure out this problem. Any help is appreciated.

Thank you

Try this

protected void paint(Graphics g) {
        int oldColor = g.getColor();
        g.setColor(Color.BLUE);
            g.drawRoundRect(1, 1, getWidth(), getHeight(), 24, 24);
            g.setColor(oldColor);
            super.paint(g);
            }

Tags: BlackBerry Developers

Similar Questions

  • Cannot create a new illustration. Problems occurred during the recording of the print file.

    I can't open a new Illustrator file. He sends me this error: failed to create a new illustration. Problems occurred during the recording of the print file. ID:-1

    I opened a previous document created in CC, but it does not allow me to copy and paste items from one doc to another.

    I rebooted with nothing doesn't.

    System:

    Adobe Creative Cloud CC

    Mac Book Pro 2012

    2.6 GHz Intel Core i7

    8 GB 1600 MHz DDR3

    On a mac, but it seems that it has resolved itself. In my view, that it may have been a corrupted file that threw everything off. Thank you.

  • Windows 7 64-bit Lightroom CC Web export fails - message says "the original file is missing.  It is a nonsense.  If I use an excerpt from browser, the web page is created without any problem.  I use page preview created as a round work but why don't web

    Trying to export a web page standard, as I have many times before with LR 5.  Now with Lightroom CC web export fails, with a list of images, each original saying file is missing.  They don't miss - all other types of export work OK.  The overview of the web browser works well and I use it as a round piece for the moment.  Please Adobe sort this issue!

    Hugh Letheren

    This problem has resolved itself.  The export feature now works as it should.  I not did something to fix the problem - very strange - but thanks for trying to help everyone!

  • How do you keep users from creating directories deeper than 260 characters of the root of the drive?

    In Windows, it seems impossible to create/join the files with a path longer than 260 characters.

    Well, not completely: you can create these files if you create a shortcut or point a reader shared inside the path, but that's exactly how this problem gets so bad: a user creates a share X: pointing to \\myserver\longdirname\evenlongerdirname\verylongdirname\etc\verylongfilename

    then it creates a file in X:\evenlongerdirnamethanYouHaveEverSeen\SuperLongDirNameJustLongEnoughToBe260FromTheRoot

    Note: the names of directories must be long, you can also create a shorter longer string of names of directories (a\b\c\d\e\f\g...)

    now, someone trying to open this file of \\myserver fail miserable. In fact, windows behaves a bit ridiculous and sometimes silently ignores files. I've seen this happen when people copy a folder of installation deep inside a fileshare: the installation program is a DVD or CD and a subscription contains 1000 directories, some are more than 260 tank when opened from the root. Then you get really weird behaviour: files ignored!

    As 260 characters was probably very well when the disks were<10GB but="" if="" you="" have="" 1="" tb="" drive,="" it's="" not="" too="" hard="" to="" end="" up="" with="" directories="" that="" are="" way="" deeper="" than="" 260="" characters.="" so="" i="" predict="" that="" there="" will="" be="" a="" time="" soon="" where="" ntfs="" needs="" to="" be="" adapted="" to="" be="" able="" to="" use="" large="" disks="" decently.="" this="" is="" also="" made="" worse="" because="" people="" create="" files="" with="" really="" bad="" names="" (e.g.="" a="" outlook="" msg="" files="" will="" be="" called="" the="" same="" as="" its="" subject="" line,="" fun="">

    Don't tell people don't do that, I see it in my everyday environment, and it breaks a lot of programs (and then the bad programmer is blamed for drawback of Windows: "you can't even open a file named a.txt")

    Question: How do you keep the users to create a file that is > 260 characters if we take into account the root of the drive, rather than a part under?

    Hi PM3.141592
     
    Your question of Windows is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT Pro TechNet public.
     

    Please ask your question in the Forums Pro Windows XP IT.

  • Border problem

    Hey all, I'm creating a customButtons using the basic model published by BB and I was wondering how to get rid of the border? I have spots of darker colours which generate a horrible color border when created, and I was wondering how to solve this problem.  I tried to create a border with custom XYedges, however this has no effect. What is the easiest way to solve the problem?

    as always, thank you guys.

    Maybe it's not the border.

    It could be the focus or something that is painted in her object or paintBackground().

    Try substituting the methods:

    1 drawFocus

    2 paint

    3 paintBackground

    And see if it has an effect.

    E.

  • border problem is not show on the right

    Hello

    I create two LabelField label1 and label2 and then I added the border both of them... and then I added

    thesefields to HorizontalFieldManager...

    Problem is that when I use the method of layout in LabelField (label1) and border on the right side of the LableField (label2) does not appear...

    LabelField label1 = new LabelField ("IMEI")
    {
    protected void paint (Graphics g)
    {
    g.setColor (Color.WHITE);
    Super.Paint (g);
    }
    protected void layout (int width, int height)
    {
    Super.Layout (width, height);
    setMargin (new XYEdges (0,0,0,50));
    }
    };
    Label1.setbackground (BackgroundFactory.createLinearGradientBackground (Color.Green, Color.Green, Color.Green, Color.Green));
    Label1.setBorder (BorderFactory.createBevelBorder (XYEdges (2,0,2,2))) of new;

    LabelField label2 = new LabelField ("dasd");

    Label2.setbackground (BackgroundFactory.createLinearGradientBackground (Color.Green, Color.Green, Color.Green, Color.Green));
    Label2.setBorder (BorderFactory.createBevelBorder (XYEdges (2,2,2,2))) of new;

    HFM HorizontalFieldManager = new HorizontalFieldManager();
          
    HFM. Add (Label1);
    HFM. Add (Label2);

    I don't know what the problem is, but you need to move this:

    setMargin (new XYEdges (0,0,0,50));

    out of the page layout.  The framework calls available when we want to know how much space to allocate to the device.  You have to set the margin before that date.

    So get out there and make a

    Label1.setMargin..)

    as you define the border.

    I see that your two BorderFactory calls are slightly different.  Is - it deliberate?

  • How can I fix "living corners" so that they convert scaled - currently as scale down become more rounded - big problem

    I'm working on a number of complex documents - I redesigned the software screens in illustrator. Many of the components has rounded corners. I created these using the function of the direct angle. Now, I need to take these screens and put in an another doc Illustrator showing a number of devices. I need to reduce the screen files to fit. As I scale down the corners change and become much too rounded.

    I select for a line (STROKE) and to set the value. For the text, I had put to describe. At the same time to avoid problems of this type. What can I do with these white shapes round to do the same. Big problem for me today, I'm working to a very tight schedule that allows no time solving each of them individually.

    Someone at - he found a way to solve this problem?

    Lindsey,

    What happens if you have traits & checked scale effects? You can set that in the Transform palette dialog box.

    Or you can object > Expand to get normal rounded rectangles.

    Just to be sure: snap to grid of pixels and align new objects on the pixel grid are not checked, they are (this would cause other issues)? If this is the case, you can select the entire document and untick finally align on the pixel grid in the Transform palette and uncheck also align new objects to the pixel grid in the options of the Launcher. You can avoid the types of documents with the default (RGB for the web and other) or change the default value for such documents.

  • Table border problems...

    I'm embarrassed to ask this question, but I can't seem to find the answer to one of my books.

    I have a table of several row defined with borders and there are two problems:

    • When the new line is added to the current row in the table, the border between the two rows is doubled.  BORDER = "1" is fine on the edges; There is just this line dubbed boring between the lines.  I tried BORDER = "1,1,0,1", but that has not worked at all.

    The next roblem I wouldn't have noticed except for the fact that I'm going to put a background color on the lines:

    • When there is no data in the cell in the row, there are no borders.  This leaves a really funky screen - watch, because populated cells have the border, and not uninhabited cells: their border is white!

    Here is the definition of the table:

    < table align = "center".

    border = "1"

    BorderColor = 'blue '.

    cellspacing = "0".

    CellPadding = "2".

    width = "95%" >

    < tr = "lightblue" background

    Color = "black" >

    < td width = "125" >

    #StructData_Line.Common_Label #.

    < table >

    etc., through several cells

    < /tr >

    < /table >

    Any suggestions?

    Hello

    Another thing that surprised me is that CSS apparently can't stand the table on the page of centering?

    He supported by centering the table, you should try something like that.

    (i) create a class in your css like that,

    table.alignCenter {margin-left:auto; margin-right:auto;}
    

    (II) and in your coldfusion page call the defined class (in your)

    Tag)

    The attachment shows the latest version, which still has the double thickness between lines.

    Try adding,

    border: 1px solid black;

    in all your

    ,definitions of class in your CSS file like this,

    table
    {
         border: 1px solid darkblue;
         width: 90%;
         align: center;
         border:1px solid black;
         border-collapse:collapse;
    }
    
    td
    {
        padding: 5px;
        border:1px solid black;
    }
    
    td.td1175
    {
        width: 175px;
        border:1px solid black;
        background: lightblue;
    }
    

    HTH

  • Navboar border problem

    Hello
    I've created a navigation bar with the behaviors of overview and click. All the these work very well, with a minor problem. When I actually click the links a 1px dashed border appears around the button. All borders are set to zero, and yet it still happens. It seems to happen in all types of browser with slight variation.

    I'm sure it's a simple problem, but I paint a blank on how to solve this problem. Any tips?

    Thank you

    Maybe:

    "akgbob" wrote in message
    News:f4ndtc$9gs$1@forums. Macromedia.com...
    > Hello,
    > I have created a navigation bar with rollover and click behaviors. All of these work
    > fine,.
    > with a minor problem. When I actually click the links of a 1px dashed border
    > appears around the button. All borders are set to zero, yet this still
    > happens. It seems to happen in all types of browser with slight variation.
    >
    > I'm sure it's a simple problem, but I paint a blank on how to solve this problem.
    > Any
    > advice?
    >
    > Thank you
    >

  • Create a set of recovery problem

    I have a windows 8, 64-bit computer pc laptop (HP pavilion g6). Whenever I try to create a collection set with DVD discs I get this message "we live errors in the creation of recovery media. Please try again. »

    Any suggestions on how to overcome this problem would be greatly appreciated.

    It is no longer a problem

  • File zip - Documents created in MS word printing problems

    Problems printing documents to MS word 7 created placed in a zip folder. The printer does not respond and the icon of the printer at the bottom right of the screen simply reveals that there are 0 documents pending. The same files in the folder have been reproduced separately outside the folder. They may not be printed too. Other documents unrelated to the zip folder print very well. I ran had interview checker tests printer and PC are working properly. All connections have been checked and there is no problem here. Can anyone help?

    Hello

    1. what operating system do you use?

    2 did you change on your computer?

    3. did you receive an error message?

    4. What is the serial number and model of the printer?

    5. do you have the entire Word document in zip folder?

    6. What does the document contains example: text, images?

    It could be a problem with the zip file; I suggest to create a new zip file and check.

    I suggest you follow the link and check.

    How to troubleshoot print failures in Word 2010, Word 2007 and Word 2003

    http://support.Microsoft.com/kb/826845

    How to troubleshoot printing problems in Word 2007 or Word 2003

    http://support.Microsoft.com/kb/826862

  • Creating Windows dvd with the problem of the "invalid class string".

    When you try to burn a file to a dvd using windows dvd creation, I received a message 'tring class not valid' when burning, and the disc has been ejected. What does the message mean? How to fix?

    Hi KEVINQUACH,

    1. When you have the startup problem?

    2. you remember to make changes to the computer before this problem?

    3 - is this happen when you try to burn any type of particular file?

    You can check out the following link and try the steps suggested by Aziz N Support Engineer on December 2, 2009, and check if this may help.

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_vista-pictures/cannot-create-dvdinvalid-class-string/24d00965-F971-4982-A440-8bb01fc0db01

    Hope this information is useful.

  • How can I create a text box border.

    Hello

    I want to create the border of the text box without using XYEdge or BorderFactory.

    means the custom text box.

    Give me a simple solution

    answer please.

    Thank you

    Himanshu

    Something else that might help:

    http://supportforums.BlackBerry.com/T5/Java-development/TextBoxField-revisited/Ta-p/548410

  • Help! Trying to create a double circular border with transparency

    I hope someone can help.  I need to create this border where all-white (the area between the Center and the two colored circles) are transparent.  I just can't understand it.  If someone could help that would be great.  I tried to create four circles and transparent traces, but I'm lost.  Thank you.Screen Shot 2016-07-02 at 10.24.05 AM.png

    I'll try it now.  Thank you.

  • I have photoshop cs2. I would like to add or insert a jpg or gif image/image layer in photoshop created with the "Rounded Rectangle tool. How would I do that?

    Screenshot_1.jpg

    The background photo/image is a layer

    I would like to add the image/photo of this layer to the white layer that has been created with the tool "rounded rectangle", and then delete the background layer and you end up with an image/icon with corners rounded

    Turn on your background layer to a regular layer by double clicking on the thumbnail in the layers palette.

    Then add a vector mask to the layer by going to layer > vector mask > reveal all the

    Then set the Rectangle rounded to path tool and draw your Rectangle on the vector mask.

Maybe you are looking for