source: fedd/abac-src/atnvis/src/com/algomagic/atn/PanelHelper.java @ 4adc697

version-1.30
Last change on this file since 4adc697 was 8780cbec, checked in by Jay Jacobs <Jay.Jacobs@…>, 15 years ago

ABAC sources from Cobham

  • Property mode set to 100644
File size: 530 bytes
RevLine 
[8780cbec]1package com.algomagic.atn;
2
3import javax.swing.*;
4import javax.swing.border.*;
5
6
7public class PanelHelper {
8
9    public static void setBorder( JComponent comp, String label ) {
10        Border empty = BorderFactory.createEmptyBorder( 0, 0, 0, 0 );
11        Border etched = BorderFactory.createEtchedBorder( );
12       
13        TitledBorder title = BorderFactory.createTitledBorder( etched, label );
14        title.setTitleJustification( TitledBorder.RIGHT );
15
16        Border compound = BorderFactory.createCompoundBorder( title, empty );
17        comp.setBorder( compound );
18    }
19}
Note: See TracBrowser for help on using the repository browser.