You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by V SANTOSH PAVAN RAJU Bs <pa...@gmail.com> on 2012/10/08 16:36:09 UTC

how to give padding through java code

Hi,
i tried to apply padding for a boxpane(which has some components) through
java code as
boxpane.getStyles().put("padding", 10);
here this padding value was applied to all the sides of baxpane i.e,
left,right,top,bottom.
So how can i apply padding to only one side through java code?

-- 
Thanks & Regards
B.S.V.S.Pavan Raju.
Skype: skype_pavan1
Hyderabad.

RE: how to give padding through java code

Posted by "Roger L. Whitcomb" <Ro...@actian.com>.
Try doing this:

boxpane.getStyles().put("padding", new Insets(2,4,6,8));

where the parameters for "Insets" are top, left, bottom, right in that
order.

 

~Roger

 

From: V SANTOSH PAVAN RAJU Bs [mailto:pavanraju.mca@gmail.com] 
Sent: Monday, October 08, 2012 7:36 AM
To: user@pivot.apache.org
Subject: how to give padding through java code

 

Hi,

i tried to apply padding for a boxpane(which has some components)
through java code as

boxpane.getStyles().put("padding", 10);

here this padding value was applied to all the sides of baxpane i.e,
left,right,top,bottom. 

So how can i apply padding to only one side through java code?


 

-- 
Thanks & Regards

B.S.V.S.Pavan Raju.

Skype: skype_pavan1

Hyderabad.