View Javadoc

1   /**
2    * Copyright 2008 WebPhotos
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  /*
17   * FrameConfig.java
18   *
19   * Created on 3 de Maio de 2006, 17:23
20   */
21  
22  package net.sf.webphotos.gui;
23  
24  /**
25   * Esta classe cria um frame com aba.
26   * Extende a classe JDialog.
27   * Seu construtor envia valores para a classe pai e chama o o método initComponents(),
28   * que foi gerado automaticamente pela IDE.
29   * @author guilherme
30   */
31  public class FrameConfig extends javax.swing.JDialog {
32      
33      /**
34       * Construtor da classe.
35       * Recebe valores e retransmite para a classe pai.
36       * e chama o método initComponents() que monta a parte gráfica.
37       * @param parent Frame para a classe {@link javax.swing.JDialog JDialog}
38       * @param modal Flag para a classe JDialog.
39       */
40      public FrameConfig(java.awt.Frame parent, boolean modal) {
41          super(parent, modal);
42          initComponents();
43      }
44      
45      /** This method is called from within the constructor to
46       * initialize the form.
47       * WARNING: Do NOT modify this code. The content of this method is
48       * always regenerated by the Form Editor.
49       */
50      // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
51      private void initComponents() {
52          jtpTabConfigs = new javax.swing.JTabbedPane();
53          painelGeral = new javax.swing.JPanel();
54  
55          setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
56          painelGeral.setLayout(new java.awt.BorderLayout());
57  
58          jtpTabConfigs.addTab("Geral", painelGeral);
59  
60          getContentPane().add(jtpTabConfigs, java.awt.BorderLayout.CENTER);
61  
62          pack();
63      }// </editor-fold>//GEN-END:initComponents
64      
65      /**
66       * Método principal.
67       * Invoca a classe {@link java.lang.Runnable Runnable} e armazena o método run() para iniciar o frame.
68       * @param args args do método main.
69       */
70      public static void main(String args[]) {
71          java.awt.EventQueue.invokeLater(new Runnable() {
72              @Override
73              public void run() {
74                  new FrameConfig(new javax.swing.JFrame(), true).setVisible(true);
75              }
76          });
77      }
78      
79      // Variables declaration - do not modify//GEN-BEGIN:variables
80      private javax.swing.JTabbedPane jtpTabConfigs;
81      private javax.swing.JPanel painelGeral;
82      // End of variables declaration//GEN-END:variables
83      
84  }