void (@NotNull JPanel p, @NotNull JBCheckBox flipHorCb, @NotNull JBCheckBox flipVerCb) { flipHorCb.setToolTipText(IdeBundle.message("tooltip.flip.vertically")); flipVerCb.setToolTipText(IdeBundle.message("tooltip.flip.horizontally")); p.setLayout(new GridLayout(1, 2, 1, 1)); Color color = getSelectionBackground(); JBPanelWithEmptyText h = addClickablePanel(p, flipHorCb, color); JBPanelWithEmptyText v = addClickablePanel(p, flipVerCb, color); h.setLayout(new BorderLayout()); h.add(new JBLabel(AllIcons.Actions.SplitVertically), BorderLayout.CENTER); v.setLayout(new BorderLayout()); v.add(new JBLabel(AllIcons.Actions.SplitHorizontally), BorderLayout.CENTER); }