Welcome!

Welcome to the official BlackBerry Support Community Forums.

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

inside custom component

Java Development

Reply
Contributor
yogeshlanjekar
Posts: 28
Registered: ‎07-10-2010
My Device: 9800
My Carrier: Vodafone

Set Line Width

Hi,

In my application, I want to set thickness of Line. But unfortunately I am not able to do it.

I have tried

 

      graphics.setStrokeWidth(4);

graphics.drawLine(10,10,100,100);

 

It is of no use. It is drawing line of default thickness for me.

At the same time, when I wrote 


      graphics.setStrokeWidth(4);

      graphics.drawRect(10,10,100,100);

 

It is drawing rectangle with Line thickness 4. I am surprised by looking at above two situations.

Can any body tell me why it is so? 

 

Thanks,

 Yogi


Please use plain text.
Developer
lakshman9687
Posts: 243
Registered: ‎07-22-2011
My Device: BlackBerry Z10
My Carrier: AirTel

Re: Set Line Width

[ Edited ]

Hi,

 

Use graphics.fillRect() method insted of draw line, here in fill rect u can specify the width and height then u can get line ....

 

 graphics.fillRect(10,10,100,100);

 

 

Thanks...

 

 

----------------------------------------------------------
Feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.

Please use plain text.