FixedPanel

FixedPanel positions content relative to the viewport rather than the document flow.

For the complete API reference, see https://doc.jdance.org.

Overview

This example displays a small fixed indicator at the lower-right edge of the browser. Scroll the documentation page to observe its behavior.

CODE
Text text = new Text("Fixed");
FixedPanel panel = new FixedPanel(text);
panel.setPadding(8);
panel.setBackground(new Color("#DCEEFF"));
panel.setHAlign(Align.RIGHT);
panel.setVAlign(Align.BOTTOM);
panel.setViewportRightMargin(12);
panel.setViewportBottomMargin(12);
RESULT
Fixed

The indicator belongs to the viewport, so it may appear outside the RESULT panel.