-
-
Notifications
You must be signed in to change notification settings - Fork 323
Open
Description
Scroll bar arrows are useful but they add visual clutter when not needed. Modern systems that still show arrow buttons generally hide them unless the scroll bar is hovered. It would be great if FlatLaf supported this: a mode where the buttons only appear when the mouse is over.
One could configure this mode e.g.:
UIManager.getDefaults().put("ScrollBar.showButtons", "auto");
Internally, it is as if the scrollbar that is hovered off/on switched the above property false/true state.
Simple test code to show 2 scrollbars:
public static void main(String[] args) throws Exception {
UIManager.setLookAndFeel(new FlatLightLaf());
UIManager.getDefaults().put("ScrollBar.showButtons", false);
JFrame frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel centerPane = new JPanel(new BorderLayout());
centerPane.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
JScrollPane scrollPane = new JScrollPane(new JTextArea(50, 80));
centerPane.add(scrollPane);
frame.getContentPane().add(centerPane);
frame.setSize(400, 300);
frame.setVisible(true);
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels