List of usage examples for com.jgoodies.forms.builder PanelBuilder addROLabel
public final JLabel addROLabel(String textWithMnemonic, String encodedConstraints)
addROLabel("Name:", "1, 1"); // No Mnemonic addROLabel("N&ame:", "1, 1"); // Mnemonic is 'a' addROLabel("Save &as:", "1, 1"); // Mnemonic is the second 'a' addROLabel("Look&&Feel:", "1, 1"); // No mnemonic, text is "look&feel" From source file:com.audiveris.installer.FolderSelector.java
License:Open Source License
private JComponent defineLayout() { final JPanel comp = new JPanel(); final FormLayout layout = new FormLayout("right:36dlu, $lcgap, fill:0:grow, $lcgap, 31dlu", "pref"); final CellConstraints cst = new CellConstraints(); final PanelBuilder builder = new PanelBuilder(layout, comp); // Label on left side builder.addROLabel("Folder", cst.xy(1, 1)); // Path to folder builder.add(path, cst.xy(3, 1));/*w w w . j a va2 s .c om*/ // "Select" button on left side builder.add(new JButton(new BrowseAction()), cst.xy(5, 1)); return comp; }
From source file:com.audiveris.installer.LangSelector.java
License:Open Source License
private JPanel defineLayout() { final JPanel comp = new JPanel(); final FormLayout layout = new FormLayout("right:40dlu, $lcgap, fill:0:grow, $lcgap, 33dlu", "pref"); final CellConstraints cst = new CellConstraints(); final PanelBuilder builder = new PanelBuilder(layout, comp); // Label on left side builder.addROLabel("Languages", cst.xy(1, 1)); // "Banner" for the center of the line banner = new Banner(); builder.add(banner.getComponent(), cst.xy(3, 1)); // "Add" button on right side JButton button = new JButton(new AddAction()); builder.add(button, cst.xy(5, 1));/*from w w w . ja v a 2 s .co m*/ return comp; }