Code example for TitledBorder

0
        setLayout(theLayout);
    } 
 
    private void createLayout() { 
        ruleScrollPane = new HelpableJScrollPane();
        ruleScrollPane.setBorder(new TitledBorder(ServiceProvider.getInstance().getLocaleService().getTranslatedString("ViolationsPerRuleTotalTitle")));
        violationsScrollPane = new HelpableJScrollPane();
        violationsScrollPane.setBorder(new TitledBorder(ServiceProvider.getInstance().getLocaleService().getTranslatedString("Violations")));
 
        theLayout = new GroupLayout(this);
        theLayout.setHorizontalGroup(theLayout.createParallelGroup(Alignment.TRAILING)
            .addGroup(theLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(theLayout.createParallelGroup(Alignment.TRAILING)
	                .addComponent(ruleScrollPane, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 497, Short.MAX_VALUE)
	                .addComponent(violationsScrollPane, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 497, Short.MAX_VALUE))
                .addContainerGap())); 
        theLayout.setVerticalGroup(theLayout.createParallelGroup(Alignment.LEADING)
            .addGroup(theLayout.createSequentialGroup()
                .addContainerGap()
Contextual code suggestions in your IDE  Get Codota for Java