The XdevHorizontalSplitPanel is a container that separates the available area into two areas, left and right, using a horizontally movable splitter. You will need to insert a layout or an UI component in both areas. The element is then automatically stretched over the entire size of the respective area. The position of the splitter that is set in the draft later becomes the initial position at runtime.
Set splitter position dynamically
Transfer the position as a decimal number
Position in pixels
horizontalSplitPanel.setSplitPosition(380.0f, Unit.PIXELS); |
Position in centimeters
verticalSplitPanel.setSplitPosition(380.0f, Unit.CM); |
Position in percentage
verticalSplitPanel.setSplitPosition(380.0f, Unit.PERCENTAGE); |
Go to the XdevHorizontalSplitPanel Javadoc