Code example for TitledBorder

0
		 
		setLayout(gl_violationDetailPane);
	} 
 
	public void loadGuiText() { 
		setBorder(new TitledBorder(ServiceProvider.getInstance().getLocaleService().getTranslatedString("Details")));
		detailsLogicalModuleFromLabel.setText(ServiceProvider.getInstance().getLocaleService().getTranslatedString("LogicalModuleFrom") + ":");
		detailLogicalModuleToLabel.setText(ServiceProvider.getInstance().getLocaleService().getTranslatedString("LogicalModuleTo") + ":");
		detailsMessageLabel.setText(ServiceProvider.getInstance().getLocaleService().getTranslatedString("Message") + ":");
		detailsSeverityLabel.setText(ServiceProvider.getInstance().getLocaleService().getTranslatedString("Severity") + ":");
		detailShowSourceCodeBtn.setText(ServiceProvider.getInstance().getLocaleService().getTranslatedString("ShowCode"));
	} 
 
	public void update(ListSelectionEvent arg0, JTable violationsTable, List<Violation> shownViolations) {
		if (!arg0.getValueIsAdjusting() && violationsTable.getSelectedRow() > -1) {
			int row = violationsTable.convertRowIndexToModel(violationsTable.getSelectedRow());
			Violation violation = shownViolations.get(row);
			detailLogicalModuleFromValue.setText(violation.getLogicalModules().getLogicalModuleFrom().getLogicalModulePath());
			detailLogicalModuleToValue.setText(violation.getLogicalModules().getLogicalModuleTo().getLogicalModulePath());
			detailMessageValue.setText(task.getMessage(violation.getMessage(), violation));