Code example for TitledBorder

0
		gridBagConstraints.weightx = 1.0;
		gridBagConstraints.insets = new Insets(5, 5, 5, 5);
		selectorPanel.add(datasourceSelector, gridBagConstraints);
 
		selectorPanel.setBorder(new TitledBorder("Datasource selection"));
		queryPanel.setBorder(new TitledBorder("SQL Query Editor"));
 
		setLayout(new BorderLayout());
		add(queryPanel, BorderLayout.CENTER);
		add(selectorPanel, BorderLayout.NORTH);
 
		log.debug("SQL Query view initialized"); 
	} 
 
	@Override 
	public void activeOntologyChanged() { 
		datasourceSelector.setDatasourceController(apic.getActiveOBDAModel());
	} 
} 
Contextual code suggestions in your IDE  Get Codota for Java