Relatively Positioning Web UI Components

This tip is applicable to NetBeans IDE (versions 5.5.1 and 6) and the Sun Java Studio Creator IDE

If, when using the Visual Designer in a Visual Web application (grid layout), you want to position a component relative to the width of the browser so that when the user widens or shortens the browser, the component moves relatively, try the following steps:

  • Select the component.

  • In the Properties window, click the ellipsis (...) button for the Style property.

  • In the Style dialog box, select Position.

  • In the Position section, set the Mode to Relative.

  • Set either the Right or Left value to a number, such as 30. This value is the percent of the browser width to the right or left of the component, respectively. For example, a Left value of 30 will place the component's left side 30% in from the left.

  • Select % from the drop-down list for the value that you just entered.

  • For the opposite side, select <Not Set> from the drop-down list. For example, if you set the Left to 30%, select <Not Set> from the drop-down list for Right

  • Click OK.
Comments:

Post a Comment:
Comments are closed for this entry.
About

divas

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today