Programming Examples

Are you a Programmer or Application Developer or a DBA? Take a cup of coffee, sit back and spend few minutes here :)

Tag Archive for ‘setBorder’

JLabel Border and Font

JLabel Border and Font Example

This example has four JLabels in it and a FlowLayout Manager is taking care of laying out these labels. Each label uses a unique border to draw around it. Since JLabel is a component, one can apply the same technique for other components as well. For example, a JTextField can use same technique to draw the border. Now, we can have a look at the Bevel Raised border in the picture above and the JLabel looks like a button, right? But it is not. We also set a Font for all the JLabels in this example.

Continue Reading →