void (JPanel panel) { for (Language language : mySliders.keySet()) { JSlider slider = mySliders.get(language); JPanel borderPanel = new JPanel(new BorderLayout()); slider.setPreferredSize(JBUI.size(100)); borderPanel.add(new JLabel(language.getID()), BorderLayout.NORTH); borderPanel.add(slider, BorderLayout.CENTER); panel.add(borderPanel, new GridBagConstraints(GridBagConstraints.RELATIVE, 1, 1, 1, 0, 1, GridBagConstraints.CENTER, GridBagConstraints.VERTICAL, JBUI.insets(0, 5), 0, 0)); } }