List of usage examples for javax.swing GroupLayout replace
public void replace(Component existingComponent, Component newComponent)
From source file:com.github.alexfalappa.nbspringboot.projects.initializr.InitializrProjectPanelVisual2.java
/** * Fixes the boot version of the dependencies. * <p>//from ww w .j av a 2s . c om * Does nothing if the panel has not been initialized. * * @param bootVersion */ public void fixBootVersion(String bootVersion) { Objects.requireNonNull(bootVersion); if (initialized) { // substitute combo with label javax.swing.GroupLayout layout = (javax.swing.GroupLayout) this.getLayout(); final JLabel label = new JLabel(bootVersion); label.setFont(label.getFont().deriveFont(Font.BOLD)); layout.replace(cbBootVersion, label); // adapt dependencies panel pBootDependencies.adaptToBootVersion(bootVersion); } }