OSDN Git Service

r104, 107辺りの変更.
[coroid/inqubus.git] / frontend / src / saccubus / Saccubus.java
1 package saccubus;
2
3 import javax.swing.SwingUtilities;
4 import javax.swing.UIManager;
5
6 /**
7  * <p>
8  * \83^\83C\83g\83\8b\82³\82«\82ã\82Î\82·
9  * </p>
10  * 
11  * <p>
12  * \90à\96¾: \83j\83R\83j\83R\93®\89æ\82Ì\93®\89æ\82ð\83R\83\81\83\93\83g\82Â\82«\82Å\95Û\91
13  * </p>
14  * 
15  * <p>
16  * \92\98\8dì\8c : Copyright (c) 2007 PSI
17  * </p>
18  * 
19  * <p>
20  * \89ï\8eÐ\96¼:
21  * </p>
22  * 
23  * @author \96¢\93ü\97Í
24  * @version 1.0
25  */
26 public class Saccubus {
27         boolean packFrame = false;
28
29         /**
30          * \83A\83v\83\8a\83P\81[\83V\83\87\83\93\82Ì\8d\\92z\82Æ\95\\8e¦\81B
31          */
32         public Saccubus() {
33                 // \83\81\83C\83\93\83t\83\8c\81[\83\80\82Ì\8f\80\94õ
34                 MainFrame frame = new MainFrame();
35                 // validate() \82Í\83T\83C\83Y\82ð\92²\90®\82·\82é
36                 // pack() \82Í\97L\8cø\82È\83T\83C\83Y\8fî\95ñ\82ð\83\8c\83C\83A\83E\83g\82È\82Ç\82©\82ç\8eæ\93¾\82·\82é
37                 if (packFrame) {
38                         frame.pack();
39                 } else {
40                         frame.validate();
41                 }
42
43                 // \83E\83B\83\93\83h\83E\82ð\92\86\89\9b\82É\94z\92u
44                 frame.setLocationByPlatform(true);
45
46                 // \83X\83v\83\89\83b\83V\83\85\82Í\89B\82·
47                 // \83\81\83C\83\93\83t\83\8c\81[\83\80\95\\8e¦
48                 frame.setVisible(true);
49         }
50
51         /**
52          * \83A\83v\83\8a\83P\81[\83V\83\87\83\93\83G\83\93\83g\83\8a\83|\83C\83\93\83g\81B
53          * 
54          * @param args
55          *            String[]
56          */
57         public static void main(String[] args) {
58                 //\88ø\90\94\82ª\97L\82é\8fê\8d\87\82ÍCUI\82Å\8bN\93®
59                 if (args.length > 0) {
60                         Prompt prompt = new Prompt();
61                         prompt.main(args);
62                         return;
63                 }
64                 //\88ø\90\94\82ª\96³\82¢\8fê\8d\87\82ÍGUI\82Å\8bN\93®
65                 SwingUtilities.invokeLater(new Runnable() {
66                         public void run() {
67                                 try {
68                                         UIManager.setLookAndFeel(UIManager
69                                                         .getSystemLookAndFeelClassName());
70                                 } catch (Exception exception) {
71                                         exception.printStackTrace();
72                                 }
73
74                                 new Saccubus();
75                         }
76                 });
77         }
78 }