source:
fedd/abac-src/atnvis/src/com/algomagic/atn/PanelHelper.java
@
ca489e8
Last change on this file since ca489e8 was 8780cbec, checked in by , 15 years ago | |
---|---|
|
|
File size: 530 bytes |
Rev | Line | |
---|---|---|
[8780cbec] | 1 | package com.algomagic.atn; |
2 | ||
3 | import javax.swing.*; | |
4 | import javax.swing.border.*; | |
5 | ||
6 | ||
7 | public 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.