JPanel () { JPanel panel; if (getDeprecatedBackground() == null) { panel = new NonOpaquePanel(new GridBagLayout()); } else { panel = new JPanel(new GridBagLayout()); UIUtil.applyDeprecatedBackground(panel); UIUtil.applyDeprecatedBackground(myComponent); } GridBagConstraints gc = new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.LINE_START, GridBagConstraints.HORIZONTAL, null, 0, 0); addToPanel(panel, gc, false); return panel; }