Code example for TitledBorder

0
        this.rightValueEditor = new JTextField(new IntegerDocument(), ""
                + current.right, 0);
 
        final JPanel panel = new JPanel(new GridBagLayout());
        panel.setBorder(
                new TitledBorder(localizationResources.getString("Insets")));
 
        // First row 
        panel.add(new JLabel(localizationResources.getString("Top")),
            new GridBagConstraints(1, 0, 3, 1, 0.0, 0.0,
            GridBagConstraints.CENTER, GridBagConstraints.NONE,
            new Insets(0, 0, 0, 0), 0, 0));
 
        // Second row 
        panel.add(new JLabel(" "), new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0,
            GridBagConstraints.CENTER, GridBagConstraints.BOTH,
            new Insets(0, 12, 0, 12), 8, 0));
        panel.add(this.topValueEditor, new GridBagConstraints(2, 1, 1, 1, 0.0,
            0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL,
            new Insets(0, 0, 0, 0), 0, 0));
Connect your IDE to all the code out there  Get Codota for Java