/**
   * This method is called from within the constructor to initialize the form. WARNING: Do NOT
   * modify this code. The content of this method is always regenerated by the Form Editor.
   */
  @SuppressWarnings("unchecked")
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {

    drawingPanel = new imagemorphing.SimpleDrawingPanel();
    frameSlider = new javax.swing.JSlider();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    setLocationByPlatform(true);
    setResizable(false);

    drawingPanel.setPreferredSize(new java.awt.Dimension(430, 400));

    javax.swing.GroupLayout drawingPanelLayout = new javax.swing.GroupLayout(drawingPanel);
    drawingPanel.setLayout(drawingPanelLayout);
    drawingPanelLayout.setHorizontalGroup(
        drawingPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 430, Short.MAX_VALUE));
    drawingPanelLayout.setVerticalGroup(
        drawingPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 400, Short.MAX_VALUE));

    frameSlider.setMaximum(30);
    frameSlider.setValue(0);
    frameSlider.addChangeListener(
        new javax.swing.event.ChangeListener() {
          public void stateChanged(javax.swing.event.ChangeEvent evt) {
            frameSliderStateChanged(evt);
          }
        });

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(
                drawingPanel,
                javax.swing.GroupLayout.PREFERRED_SIZE,
                javax.swing.GroupLayout.DEFAULT_SIZE,
                javax.swing.GroupLayout.PREFERRED_SIZE)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addGap(106, 106, 106)
                    .addComponent(
                        frameSlider,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addComponent(
                        drawingPanel,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18)
                    .addComponent(
                        frameSlider,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    pack();
  } // </editor-fold>//GEN-END:initComponents
예제 #2
0
  /**
   * This method is called from within the constructor to initialize the form. WARNING: Do NOT
   * modify this code. The content of this method is always regenerated by the Form Editor.
   */
  @SuppressWarnings("unchecked")
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {

    jLabel2 = new javax.swing.JLabel();
    lblTitulo = new javax.swing.JLabel();
    jLabel1 = new javax.swing.JLabel();
    descripcion = new javax.swing.JTextField();
    jLabel4 = new javax.swing.JLabel();
    folio = new javax.swing.JTextField();
    jScrollPane1 = new javax.swing.JScrollPane();
    tablaPrincipal = new javax.swing.JTable();
    btnNuevo = new javax.swing.JButton();
    btnImprimir = new javax.swing.JButton();
    jPanel1 = new javax.swing.JPanel();
    btnCerrar = new javax.swing.JButton();
    jLabel5 = new javax.swing.JLabel();
    jLabel6 = new javax.swing.JLabel();
    jLabel7 = new javax.swing.JLabel();
    almacen = new javax.swing.JTextField();
    tipoMovimiento = new javax.swing.JComboBox();
    txtSumaTotal = new javax.swing.JTextField();
    jLabel8 = new javax.swing.JLabel();
    btnEliminarRenglon = new javax.swing.JButton();
    fecha = new org.jdesktop.swingx.JXDatePicker();
    jLabel3 = new javax.swing.JLabel();

    jLabel2.setText("jLabel2");

    setTitle("Movimiento de almacén");
    getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

    lblTitulo.setFont(new java.awt.Font("Arial", 1, 36));
    lblTitulo.setForeground(new java.awt.Color(255, 255, 255));
    lblTitulo.setText("Movimiento de almacén");
    getContentPane()
        .add(lblTitulo, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, -1, 40));

    jLabel1.setFont(new java.awt.Font("Tahoma", 1, 12));
    jLabel1.setForeground(new java.awt.Color(255, 255, 255));
    jLabel1.setText("Descripción:");
    getContentPane()
        .add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 90, -1, 30));
    getContentPane()
        .add(descripcion, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 90, 600, -1));

    jLabel4.setFont(new java.awt.Font("Tahoma", 1, 12));
    jLabel4.setForeground(new java.awt.Color(255, 255, 255));
    jLabel4.setText("Folio:");
    getContentPane()
        .add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(700, 90, -1, 30));
    getContentPane().add(folio, new org.netbeans.lib.awtextra.AbsoluteConstraints(740, 90, 80, -1));

    tablaPrincipal.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
    tablaPrincipal.setModel(
        new javax.swing.table.DefaultTableModel(
            new Object[][] {},
            new String[] {"Código artículo", "Descripción", "Costo", "Cantidad", "Total"}) {
          boolean[] canEdit = new boolean[] {true, false, true, true, false};

          public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit[columnIndex];
          }
        });
    tablaPrincipal.setToolTipText("[ F1 ] catalogo de articulos");
    tablaPrincipal.setCellSelectionEnabled(true);
    tablaPrincipal.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
    tablaPrincipal.setGridColor(new java.awt.Color(51, 255, 255));
    tablaPrincipal.setRowHeight(25);
    tablaPrincipal.setShowHorizontalLines(false);
    tablaPrincipal.setSurrendersFocusOnKeystroke(true);
    jScrollPane1.setViewportView(tablaPrincipal);

    getContentPane()
        .add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 120, 820, 280));

    btnNuevo.setIcon(
        new javax.swing.ImageIcon(getClass().getResource("/64x64/page_add.png"))); // NOI18N
    btnNuevo.setText("<html><center>Agregar éste movimiento [F5]</center></html>");
    btnNuevo.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnNuevoActionPerformed(evt);
          }
        });
    getContentPane()
        .add(btnNuevo, new org.netbeans.lib.awtextra.AbsoluteConstraints(470, 440, 190, 60));

    btnImprimir.setIcon(
        new javax.swing.ImageIcon(getClass().getResource("/64x64/printer.png"))); // NOI18N
    btnImprimir.setText("<html><center>Imprimir [F8]</center></html>");
    btnImprimir.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnImprimirActionPerformed(evt);
          }
        });
    getContentPane()
        .add(btnImprimir, new org.netbeans.lib.awtextra.AbsoluteConstraints(670, 440, 160, 60));

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(
        jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE));
    jPanel1Layout.setVerticalGroup(
        jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE));

    getContentPane()
        .add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(810, 480, 30, 30));

    btnCerrar.setIcon(
        new javax.swing.ImageIcon(getClass().getResource("/64x64/back.png"))); // NOI18N
    btnCerrar.setText("<HTML>Regresar a almacén [Esc]</HTML>");
    btnCerrar.setRequestFocusEnabled(false);
    btnCerrar.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnCerrarActionPerformed(evt);
          }
        });
    getContentPane()
        .add(btnCerrar, new org.netbeans.lib.awtextra.AbsoluteConstraints(600, 10, 230, 40));

    jLabel5.setFont(new java.awt.Font("Tahoma", 1, 12));
    jLabel5.setForeground(new java.awt.Color(255, 255, 255));
    jLabel5.setText("Tipo de movimiento:");
    getContentPane()
        .add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 60, 130, 30));

    jLabel6.setFont(new java.awt.Font("Tahoma", 1, 12));
    jLabel6.setForeground(new java.awt.Color(255, 255, 255));
    jLabel6.setText("Fecha:");
    getContentPane()
        .add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(630, 60, 40, 30));

    jLabel7.setFont(new java.awt.Font("Tahoma", 1, 12));
    jLabel7.setForeground(new java.awt.Color(255, 255, 255));
    jLabel7.setText("Almacén [F1]:");
    getContentPane()
        .add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(340, 50, 90, 30));

    almacen.setEditable(false);
    getContentPane()
        .add(almacen, new org.netbeans.lib.awtextra.AbsoluteConstraints(430, 60, 190, -1));

    tipoMovimiento.setModel(
        new javax.swing.DefaultComboBoxModel(
            new String[] {"Entrada al almacén", "Salida del almacén", "Ajuste"}));
    getContentPane()
        .add(tipoMovimiento, new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 60, 140, -1));
    getContentPane()
        .add(txtSumaTotal, new org.netbeans.lib.awtextra.AbsoluteConstraints(660, 410, 170, -1));

    jLabel8.setFont(new java.awt.Font("Tahoma", 1, 12));
    jLabel8.setForeground(new java.awt.Color(255, 255, 255));
    jLabel8.setText("Total:");
    getContentPane()
        .add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(610, 410, -1, 20));

    btnEliminarRenglon.setIcon(
        new javax.swing.ImageIcon(getClass().getResource("/16x16/remove.png"))); // NOI18N
    btnEliminarRenglon.setText("Eliminar renglón seleccionado [F12]");
    btnEliminarRenglon.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnEliminarRenglonActionPerformed(evt);
          }
        });
    getContentPane()
        .add(
            btnEliminarRenglon, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 410, -1, -1));

    fecha.setFormats(java.text.DateFormat.getDateInstance(java.text.DateFormat.MEDIUM));
    getContentPane()
        .add(fecha, new org.netbeans.lib.awtextra.AbsoluteConstraints(670, 60, 160, -1));

    jLabel3.setFont(new java.awt.Font("Tahoma", 3, 12)); // NOI18N
    jLabel3.setText("[ F1 ] catalogo de articulos");
    getContentPane()
        .add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(250, 410, 190, 20));

    pack();
  } // </editor-fold>//GEN-END:initComponents
  /**
   * This method is called from within the constructor to initialize the form. WARNING: Do NOT
   * modify this code. The content of this method is always regenerated by the Form Editor.
   */
  @SuppressWarnings("unchecked")
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {

    jButton1 = new javax.swing.JButton();
    imagePanel1 = new ImagePanel();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setTitle("Google Maps Example");

    jButton1.setText("Retrieve Map");
    jButton1.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton1ActionPerformed(evt);
          }
        });

    imagePanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

    javax.swing.GroupLayout imagePanel1Layout = new javax.swing.GroupLayout(imagePanel1);
    imagePanel1.setLayout(imagePanel1Layout);
    imagePanel1Layout.setHorizontalGroup(
        imagePanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 397, Short.MAX_VALUE));
    imagePanel1Layout.setVerticalGroup(
        imagePanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 352, Short.MAX_VALUE));

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addGap(28, 28, 28)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(
                                imagePanel1,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addGap(47, 47, 47)
                                    .addComponent(
                                        jButton1,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        316,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap(30, Short.MAX_VALUE)));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addGap(25, 25, 25)
                    .addComponent(
                        imagePanel1,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jButton1)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    pack();
  } // </editor-fold>//GEN-END:initComponents