Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Java
Posted by: bilal baig
Added: Jan 7, 2018 1:45 PM
Views: 32
Tags: no tags
  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. package dom;
  7.  
  8. import java.awt.Color;
  9.  
  10. /**
  11.  *
  12.  * @author Bilal
  13.  */
  14. public class Register extends javax.swing.JFrame {
  15.  
  16.     /**
  17.      * Creates new form register
  18.      */
  19.     public Register(int r,int g,int b) {
  20.         initComponents();
  21.         jPanel1.setBackground(new Color(r,g,b));
  22.     }
  23.  
  24.     /**
  25.      * This method is called from within the constructor to initialize the form.
  26.      * WARNING: Do NOT modify this code. The content of this method is always
  27.      * regenerated by the Form Editor.
  28.      */
  29.     @SuppressWarnings("unchecked")
  30.     // <editor-fold defaultstate="collapsed" desc="Generated Code">                          
  31.     private void initComponents() {
  32.  
  33.         jPanel1 = new javax.swing.JPanel();
  34.  
  35.         setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
  36.         setTitle("Register");
  37.  
  38.         javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
  39.         jPanel1.setLayout(jPanel1Layout);
  40.         jPanel1Layout.setHorizontalGroup(
  41.             jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  42.             .addGap(0, 400, Short.MAX_VALUE)
  43.         );
  44.         jPanel1Layout.setVerticalGroup(
  45.             jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  46.             .addGap(0, 300, Short.MAX_VALUE)
  47.         );
  48.  
  49.         javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
  50.         getContentPane().setLayout(layout);
  51.         layout.setHorizontalGroup(
  52.             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  53.             .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
  54.         );
  55.         layout.setVerticalGroup(
  56.             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  57.             .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
  58.         );
  59.  
  60.         pack();
  61.     }// </editor-fold>                        
  62.  
  63.     /**
  64.      * @param args the command line arguments
  65.      */
  66.    
  67.     // Variables declaration - do not modify                    
  68.     private javax.swing.JPanel jPanel1;
  69.     // End of variables declaration                  
  70. }
  71.