private void responsiveBehavior(boolean tabletScreen) { if (content != null && nav != null) { if (tabletScreen) { AnchorPane.setLeftAnchor(content, 0d); nav.setTranslateX(-DEFAULT_WIDTH_NAV); } else { AnchorPane.setLeftAnchor(content, DEFAULT_WIDTH_NAV); nav.setTranslateX(0); toggleLayer.setVisible(false); drawerOpened = false; } } }