07-21-2009 07:23 AM
can i change the color of border ?
if posiible how?
Border border = BorderFactory.createSimpleBorder(edges);
thanks
07-21-2009 07:33 AM
Check this method of BorderFactory:
public static Border createSimpleBorder(XYEdges edges,
int style)
Create a simple border with specified colors and style.
Parameters:
edges - XYEdges object representing the width/thickness of the border's four sides in pixels.
colors - XYEdges object representing the colors of the border's four sides in 0xAARRGGBB format (includes alpha channel).
style - STYLE_TRANSPARENT, STYLE_SOLID, SYLE_DOTTED, STYLE_DASHED.
Returns:
Border object representing a simple border.
07-21-2009 08:22 AM
how to create XYEdges Color?
i can t get it
Can u expain in detail
this is my code
XYEdges edges = new XYEdges(20, 20, 20, 20);
int sz=Border.STYLE_FILLED;
i Border border = BorderFactory.createSimpleBorder(edges, ,sz);
border.getBackground();
fm.setBorder(border);
07-21-2009 08:28 AM
I am sorry, but I did not use this method before.
And I did not check how exactly does it operate with XYEdges color parameters.
07-21-2009 08:45 PM
Hi
I have use the following implementation:
I have the create the following image:

This image have a specific color edge and background.
In the application you can use the following code:
private VerticalFieldManager _manager; Background image_background = BackgroundFactory.createBitmapBackground(Bitmap.ge
tBitmapResource(nameImage.png), 0, 0, Background.REPEAT_INHERIT); _manager.setBackground(image_background); /** Manager for the text that will add to the container. */ _container_text = new VerticalFieldManager(); /** Borders for Rounded content */ XYEdges rounded_edges = new XYEdges(11, 11, 11, 11); Border rounded_content = BorderFactory.createBitmapBorder(rounded_edges, Bitmap.getBitmapResource(_resources.getString(IMAG E_BOX))); _container_text.setBorder(rounded_content); String _textField = _seed.getElement(HopperData.PROBLEM_DESCRIPTION); String _dateField = new DateField("Entered: ", date.getTime(), sdFormat); _manager.add(_container_text); _container_text.add(_dateField); _container_text.add(new SeparatorField()); _container_text.add(_textField);
The Resutl is:
With this method you can change the edge and background of your screen.
If You have any questions let me know.
Thanks
Jorge Luis
07-22-2009 01:57 AM
ur code worked,and i get a image around the frame,but how to get the colors in the border,
can u tell plz
thanks
07-22-2009 02:04 AM
You will create the box with the preferred color. This is a image, not code.
thanks
07-22-2009 02:12 AM
1.use XYRect method
2.assign this to BorderorderFactory.createBitmapBorder();
3.setBordet();
07-22-2009 02:35 AM
createSimpleBorder(XYEdges edges, XYEdges colors, XYEdges style)
Create a simple border with specified colors and styles.
what this color denotes can u help me
i want the colors instead of imagees,that's what required