Advertisement
AbraaoAllysson

netbeans

Jul 20th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5.17 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6.  
  7. /**
  8.  *
  9.  * @author abraao
  10.  */
  11. public class NovoJFrame extends javax.swing.JFrame {
  12.  
  13.     /**
  14.      * Creates new form NovoJFrame
  15.      */
  16.     public NovoJFrame() {
  17.         initComponents();
  18.     }
  19.  
  20.     /**
  21.      * This method is called from within the constructor to initialize the form.
  22.      * WARNING: Do NOT modify this code. The content of this method is always
  23.      * regenerated by the Form Editor.
  24.      */
  25.     @SuppressWarnings("unchecked")
  26.     // <editor-fold defaultstate="collapsed" desc="Generated Code">                          
  27.     private void initComponents() {
  28.  
  29.         jScrollPane2 = new javax.swing.JScrollPane();
  30.         jTextArea2 = new javax.swing.JTextArea();
  31.         jButton1 = new javax.swing.JButton();
  32.         jButton2 = new javax.swing.JButton();
  33.  
  34.         setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
  35.  
  36.         jTextArea2.setColumns(20);
  37.         jTextArea2.setRows(5);
  38.         jScrollPane2.setViewportView(jTextArea2);
  39.  
  40.         jButton1.setText("jButton1");
  41.  
  42.         jButton2.setText("jButton1");
  43.  
  44.         javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
  45.         getContentPane().setLayout(layout);
  46.         layout.setHorizontalGroup(
  47.             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  48.             .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
  49.                 .addContainerGap()
  50.                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
  51.                     .addGroup(layout.createSequentialGroup()
  52.                         .addGap(0, 0, Short.MAX_VALUE)
  53.                         .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE)
  54.                         .addGap(18, 18, 18)
  55.                         .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE))
  56.                     .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 681, Short.MAX_VALUE))
  57.                 .addGap(52, 52, 52))
  58.         );
  59.         layout.setVerticalGroup(
  60.             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  61.             .addGroup(layout.createSequentialGroup()
  62.                 .addGap(6, 6, 6)
  63.                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  64.                     .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)
  65.                     .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE))
  66.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  67.                 .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 523, Short.MAX_VALUE)
  68.                 .addGap(32, 32, 32))
  69.         );
  70.  
  71.         pack();
  72.     }// </editor-fold>                        
  73.  
  74.     /**
  75.      * @param args the command line arguments
  76.      */
  77.     public static void main(String args[]) {
  78.         /* Set the Nimbus look and feel */
  79.         //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
  80.         /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
  81.          * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
  82.          */
  83.         try {
  84.             for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
  85.                 if ("Nimbus".equals(info.getName())) {
  86.                     javax.swing.UIManager.setLookAndFeel(info.getClassName());
  87.                     break;
  88.                 }
  89.             }
  90.         } catch (ClassNotFoundException ex) {
  91.             java.util.logging.Logger.getLogger(NovoJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  92.         } catch (InstantiationException ex) {
  93.             java.util.logging.Logger.getLogger(NovoJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  94.         } catch (IllegalAccessException ex) {
  95.             java.util.logging.Logger.getLogger(NovoJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  96.         } catch (javax.swing.UnsupportedLookAndFeelException ex) {
  97.             java.util.logging.Logger.getLogger(NovoJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  98.         }
  99.         //</editor-fold>
  100.  
  101.         /* Create and display the form */
  102.         java.awt.EventQueue.invokeLater(new Runnable() {
  103.             public void run() {
  104.                 new NovoJFrame().setVisible(true);
  105.             }
  106.         });
  107.     }
  108.  
  109.     // Variables declaration - do not modify                    
  110.     private javax.swing.JButton jButton1;
  111.     private javax.swing.JButton jButton2;
  112.     private javax.swing.JScrollPane jScrollPane2;
  113.     private javax.swing.JTextArea jTextArea2;
  114.     // End of variables declaration                  
  115. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement