OSDN Git Service

43a35e74fbc6097ddb0f769591506f73f979e926
[hayashilib/hayashi.git] / src / hayashi / yuu / tools / properties / CategoryBox.java
1 package hayashi.yuu.tools.properties;\r
2 \r
3 import java.awt.GridLayout;\r
4 import javax.swing.BorderFactory;\r
5 import javax.swing.JComponent;\r
6 import javax.swing.JPanel;\r
7 \r
8 /**\r
9  * 枠で囲まれたパネル\r
10  */\r
11 public class CategoryBox {\r
12         /**\r
13          * 枠で囲まれたパネル\r
14          * @param title パネルのタイトル\r
15          * @param compo パネルの内容\r
16          * @return 作成されたインスタンス\r
17          */\r
18         public static JPanel makePanel(String title, JComponent compo) {\r
19         JPanel p = new JPanel(new GridLayout(1,1));\r
20         p.setBorder(BorderFactory.createTitledBorder(title));\r
21         p.add(compo);\r
22         return p;\r
23     }\r
24 }\r