JPanel () { JPanel header = new NonOpaquePanel(new BorderLayout(JBUIScale.scale(15), 0)); header.setBorder(JBUI.Borders.emptyRight(20)); myPanel.add(header, BorderLayout.NORTH); myIconLabel = new JLabel(); myIconLabel.setBorder(JBUI.Borders.emptyTop(5)); myIconLabel.setVerticalAlignment(SwingConstants.TOP); myIconLabel.setOpaque(false); header.add(myIconLabel, BorderLayout.WEST); return header; }