List of usage examples for java.lang Short MAX_VALUE
short MAX_VALUE
To view the source code for java.lang Short MAX_VALUE.
Click Source Link
From source file:gedi.util.MathUtils.java
/** * Throws an exception if n is either a real or to big to be represented by a byte. * @param n//from w w w . j a v a2 s .c om * @return */ public static short shortValueExact(Number n) { if (n instanceof Short || n instanceof Byte) return n.shortValue(); double d = n.doubleValue(); long l = n.longValue(); if (d == (double) l) { if (l >= Short.MIN_VALUE && l <= Short.MAX_VALUE) return (short) l; } throw new NumberFormatException(); }
From source file:ImageProcessing.GrayscaleHistogram_GUI.java
/** * 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.//www. ja v a 2 s .c o m */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { sourceImageHistogram = new javax.swing.JLabel(); processedImageHistogram = new javax.swing.JLabel(); sourceLabel = new javax.swing.JLabel(); processedLabel = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("Grayscale Histogram"); sourceLabel.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N sourceLabel.setText("Source Image Histogram"); processedLabel.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N processedLabel.setText("Processed Image Histogram"); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(processedLabel).addComponent(sourceLabel) .addComponent(sourceImageHistogram, javax.swing.GroupLayout.PREFERRED_SIZE, 500, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(processedImageHistogram, javax.swing.GroupLayout.PREFERRED_SIZE, 500, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap().addComponent(sourceLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(sourceImageHistogram, javax.swing.GroupLayout.PREFERRED_SIZE, 175, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18).addComponent(processedLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(processedImageHistogram, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); pack(); }
From source file:gui.EspecificacionesAnimal.java
/** * Creates new form EspecificacionesAnimal * * @param aparent/*ww w . j a va 2 s . c o m*/ */ public EspecificacionesAnimal(Desktop parent) { this.parent = parent; initComponents(); setLocationRelativeTo(null); cargarPuertos(); tf_PesoActual.textFieldDouble(); tf_Temperatura.textFieldDouble(); corralSelector.addArray(cargarCorrales()); sexoSelector1.cargar(); animalDetalle = new Animal(); String titulos[] = { "Fecha", "Peso (kg)" }; t_pesos.setTitulos(titulos); t_pesos.cambiarTitulos(); t_pesos.setFormato(new int[] { 3, 1 }); g = new domain.Grafica(); Grafica = g.createChart(g.createDatasetPesos(t_pesos)); jP_Grafica = new ChartPanel(Grafica); jP_Grafica.setBackground(new java.awt.Color(255, 255, 204)); jP_Grafica.setBorder(javax.swing.BorderFactory.createEtchedBorder()); javax.swing.GroupLayout jP_GraficaLayout = new javax.swing.GroupLayout(jP_Grafica); jP_Grafica.setLayout(jP_GraficaLayout); jP_GraficaLayout.setHorizontalGroup(jP_GraficaLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE)); jP_GraficaLayout.setVerticalGroup(jP_GraficaLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 368, Short.MAX_VALUE)); panelGrafica.add(jP_Grafica, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, panelGrafica.getWidth(), panelGrafica.getHeight())); graficar(); fecha_peso = Calendar.getInstance(); JDc_FechaCompra.setDate(Calendar.getInstance().getTime()); JDc_FechaIngreso.setDate(Calendar.getInstance().getTime()); Image i = null; i = Toolkit.getDefaultToolkit().getImage(getClass().getResource("/resources/logo tru-test.png")); setIconImage(i); // this.pack(); // this.setClosable(true); // this.setFrameIcon(new ImageIcon(this.getClass().getResource("/resources/logo tru-test.png"))); this.semental.cargarTagsIdsSementales(); this.proveedorSelector1.cargar(); this.setTitle(this.getTitle() + " " + rancho.descripcion); this.razaSelector1.valor_nuevo = true; this.proveedorSelector1.valor_nuevo = true; this.tf_ganancia.setEditable(false); razaSelector1.cargarSeleccionar(); loteSelector1.cargar(); animalSelectorMadre.cargararete_visuals_2(); animalSelectorPadre.cargararete_visuals_2(); cargarComponentes(); }
From source file:app.gui.Histogram.java
/** * 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./*from w w w. j ava2s . c o m*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { jPanel1 = new javax.swing.JPanel(); jBtnRed = new javax.swing.JButton(); jBtnGreen = new javax.swing.JButton(); jBtnBlue = new javax.swing.JButton(); jBtnGrey = new javax.swing.JButton(); jPanel2 = new javax.swing.JPanel(); jMenuBar1 = new javax.swing.JMenuBar(); jMenu1 = new javax.swing.JMenu(); jmiSave = new javax.swing.JMenuItem(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); jBtnRed.setText("Red"); jBtnRed.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBtnRedActionPerformed(evt); } }); jBtnGreen.setText("Green"); jBtnGreen.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBtnGreenActionPerformed(evt); } }); jBtnBlue.setText("Blue"); jBtnBlue.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBtnBlueActionPerformed(evt); } }); jBtnGrey.setText("I"); jBtnGrey.setToolTipText(""); jBtnGrey.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBtnGreyActionPerformed(evt); } }); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout .setHorizontalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jBtnRed, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jBtnGreen, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(jBtnBlue, javax.swing.GroupLayout.PREFERRED_SIZE, 61, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18).addComponent(jBtnGrey, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(56, 56, 56))); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jBtnRed).addComponent(jBtnGreen).addComponent(jBtnBlue) .addComponent(jBtnGrey))); jPanel2.setPreferredSize(new java.awt.Dimension(0, 0)); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup(jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 400, Short.MAX_VALUE)); jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 250, Short.MAX_VALUE)); jPanel2.setLayout(new java.awt.BorderLayout()); jMenu1.setText("File"); jmiSave.setText("Save"); jmiSave.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jmiSaveActionPerformed(evt); } }); jMenu1.add(jmiSave); jMenuBar1.add(jMenu1); setJMenuBar(jMenuBar1); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE)); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, 250, Short.MAX_VALUE))); add(jPanel2, java.awt.BorderLayout.CENTER); pack(); }
From source file:streaming.swing.JDialogFilmAjouter.java
/** * 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.//from w w w . jav a 2s .c o m */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel1 = new javax.swing.JLabel(); jPanel1 = new javax.swing.JPanel(); jTextField1 = new javax.swing.JTextField(); jLabel2 = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); jTextField2 = new javax.swing.JTextField(); jLabel3 = new javax.swing.JLabel(); jPanel3 = new javax.swing.JPanel(); jTextField3 = new javax.swing.JTextField(); jLabel4 = new javax.swing.JLabel(); jPanel4 = new javax.swing.JPanel(); jComboBox2 = new javax.swing.JComboBox<>(); jLabel5 = new javax.swing.JLabel(); jPanel5 = new javax.swing.JPanel(); jComboBox1 = new javax.swing.JComboBox<>(); jPanel6 = new javax.swing.JPanel(); jPanel7 = new javax.swing.JPanel(); jButton1 = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); getContentPane().setLayout(new java.awt.GridLayout(6, 3)); jLabel1.setText("Titre :"); getContentPane().add(jLabel1); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 133, Short.MAX_VALUE)); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 50, Short.MAX_VALUE)); getContentPane().add(jPanel1); jTextField1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextField1ActionPerformed(evt); } }); getContentPane().add(jTextField1); jLabel2.setText("Anne :"); getContentPane().add(jLabel2); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup(jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 133, Short.MAX_VALUE)); jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 50, Short.MAX_VALUE)); getContentPane().add(jPanel2); getContentPane().add(jTextField2); jLabel3.setText("Synopsis :"); getContentPane().add(jLabel3); javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup(jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 133, Short.MAX_VALUE)); jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 50, Short.MAX_VALUE)); getContentPane().add(jPanel3); jTextField3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextField3ActionPerformed(evt); } }); getContentPane().add(jTextField3); jLabel4.setText("Genre :"); getContentPane().add(jLabel4); javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4); jPanel4.setLayout(jPanel4Layout); jPanel4Layout.setHorizontalGroup(jPanel4Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 133, Short.MAX_VALUE)); jPanel4Layout.setVerticalGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 50, Short.MAX_VALUE)); getContentPane().add(jPanel4); jComboBox2.setModel( new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); jComboBox2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jComboBox2ActionPerformed(evt); } }); getContentPane().add(jComboBox2); jLabel5.setText("Pays :"); getContentPane().add(jLabel5); javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5); jPanel5.setLayout(jPanel5Layout); jPanel5Layout.setHorizontalGroup(jPanel5Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 133, Short.MAX_VALUE)); jPanel5Layout.setVerticalGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 50, Short.MAX_VALUE)); getContentPane().add(jPanel5); jComboBox1.setModel( new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); getContentPane().add(jComboBox1); javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6); jPanel6.setLayout(jPanel6Layout); jPanel6Layout.setHorizontalGroup(jPanel6Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 133, Short.MAX_VALUE)); jPanel6Layout.setVerticalGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 50, Short.MAX_VALUE)); getContentPane().add(jPanel6); javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7); jPanel7.setLayout(jPanel7Layout); jPanel7Layout.setHorizontalGroup(jPanel7Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 133, Short.MAX_VALUE)); jPanel7Layout.setVerticalGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 50, Short.MAX_VALUE)); getContentPane().add(jPanel7); jButton1.setText("Ajouter"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); getContentPane().add(jButton1); pack(); }
From source file:my.swingconnect.SwingConnectUI.java
/** * 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./*from w w w . j av a 2s . c o m*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jDialog1 = new javax.swing.JDialog(); jDialog2 = new javax.swing.JDialog(); jScrollPane1 = new javax.swing.JScrollPane(); jTextArea1 = new javax.swing.JTextArea(); jLabel1 = new javax.swing.JLabel(); jTextField1 = new javax.swing.JTextField(); jLabel2 = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); jLabel3 = new javax.swing.JLabel(); jTextField3 = new javax.swing.JTextField(); jLabel4 = new javax.swing.JLabel(); jTextField4 = new javax.swing.JTextField(); jButton2 = new javax.swing.JButton(); jCheckBox1 = new javax.swing.JCheckBox(); jPasswordField1 = new javax.swing.JPasswordField(); jSeparator1 = new javax.swing.JSeparator(); jButton3 = new javax.swing.JButton(); jScrollPane2 = new javax.swing.JScrollPane(); jTextArea2 = new javax.swing.JTextArea(); jLabel6 = new javax.swing.JLabel(); jButton4 = new javax.swing.JButton(); jCheckBox2 = new javax.swing.JCheckBox(); jCheckBox3 = new javax.swing.JCheckBox(); jCheckBox4 = new javax.swing.JCheckBox(); jLabel5 = new javax.swing.JLabel(); jOptionPane1 = new javax.swing.JOptionPane(); javax.swing.GroupLayout jDialog1Layout = new javax.swing.GroupLayout(jDialog1.getContentPane()); jDialog1.getContentPane().setLayout(jDialog1Layout); jDialog1Layout.setHorizontalGroup(jDialog1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 400, Short.MAX_VALUE)); jDialog1Layout.setVerticalGroup(jDialog1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 300, Short.MAX_VALUE)); javax.swing.GroupLayout jDialog2Layout = new javax.swing.GroupLayout(jDialog2.getContentPane()); jDialog2.getContentPane().setLayout(jDialog2Layout); jDialog2Layout.setHorizontalGroup(jDialog2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 400, Short.MAX_VALUE)); jDialog2Layout.setVerticalGroup(jDialog2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 300, Short.MAX_VALUE)); jTextArea1.setColumns(20); jTextArea1.setRows(5); jScrollPane1.setViewportView(jTextArea1); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("Welcome to Photo-drop !!!"); getContentPane().setLayout(null); jLabel1.setFont(new java.awt.Font("Lucida Handwriting", 3, 14)); // NOI18N jLabel1.setText("Enter the Username :"); getContentPane().add(jLabel1); jLabel1.setBounds(70, 120, 170, 25); jTextField1.setFont(new java.awt.Font("Lucida Handwriting", 3, 14)); // NOI18N jTextField1.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED, new java.awt.Color(255, 153, 153), java.awt.Color.lightGray, new java.awt.Color(255, 204, 204), new java.awt.Color(204, 255, 255))); jTextField1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextField1ActionPerformed(evt); } }); getContentPane().add(jTextField1); jTextField1.setBounds(250, 120, 180, 30); jLabel2.setFont(new java.awt.Font("Lucida Handwriting", 1, 14)); // NOI18N jLabel2.setText("Password : "); getContentPane().add(jLabel2); jLabel2.setBounds(450, 120, 90, 20); jButton1.setFont(new java.awt.Font("Lucida Handwriting", 3, 13)); // NOI18N jButton1.setText("Login"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); getContentPane().add(jButton1); jButton1.setBounds(750, 120, 86, 30); jLabel3.setFont(new java.awt.Font("Lucida Handwriting", 3, 14)); // NOI18N jLabel3.setText("URL: "); getContentPane().add(jLabel3); jLabel3.setBounds(90, 240, 50, 20); jTextField3.setFont(new java.awt.Font("Lucida Handwriting", 3, 14)); // NOI18N jTextField3.setText("http://photo-drop.com/uploader.php"); jTextField3.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED, new java.awt.Color(255, 153, 153), new java.awt.Color(204, 204, 204), new java.awt.Color(255, 204, 204), new java.awt.Color(153, 255, 255))); jTextField3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextField3ActionPerformed(evt); } }); getContentPane().add(jTextField3); jTextField3.setBounds(250, 230, 340, 30); jLabel4.setFont(new java.awt.Font("Lucida Handwriting", 3, 14)); // NOI18N jLabel4.setText("Select a directory:"); getContentPane().add(jLabel4); jLabel4.setBounds(70, 280, 150, 26); jTextField4.setFont(new java.awt.Font("Lucida Handwriting", 3, 13)); // NOI18N jTextField4.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED, new java.awt.Color(255, 204, 204), new java.awt.Color(204, 204, 204), new java.awt.Color(255, 204, 204), new java.awt.Color(153, 255, 255))); jTextField4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextField4ActionPerformed(evt); } }); getContentPane().add(jTextField4); jTextField4.setBounds(250, 280, 340, 30); jButton2.setFont(new java.awt.Font("Lucida Handwriting", 3, 13)); // NOI18N jButton2.setText("Select a directory..."); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); getContentPane().add(jButton2); jButton2.setBounds(610, 280, 182, 29); jCheckBox1.setFont(new java.awt.Font("Lucida Handwriting", 3, 13)); // NOI18N jCheckBox1.setText("Use Expect Header"); jCheckBox1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jCheckBox1ActionPerformed(evt); } }); getContentPane().add(jCheckBox1); jCheckBox1.setBounds(420, 320, 180, 24); jPasswordField1.setFont(new java.awt.Font("Lucida Handwriting", 3, 14)); // NOI18N jPasswordField1.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED, new java.awt.Color(255, 153, 153), new java.awt.Color(204, 204, 204), new java.awt.Color(255, 204, 204), new java.awt.Color(153, 255, 255))); getContentPane().add(jPasswordField1); jPasswordField1.setBounds(550, 120, 180, 30); jSeparator1.setBackground(new java.awt.Color(204, 204, 204)); jSeparator1.setForeground(new java.awt.Color(0, 0, 0)); jSeparator1.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)); getContentPane().add(jSeparator1); jSeparator1.setBounds(10, 202, 850, 10); jButton3.setFont(new java.awt.Font("Lucida Handwriting", 3, 14)); // NOI18N jButton3.setText("Upload"); jButton3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton3ActionPerformed(evt); } }); getContentPane().add(jButton3); jButton3.setBounds(310, 320, 102, 29); jButton3.getAccessibleContext().setAccessibleName("jButton3"); jTextArea2.setColumns(20); jTextArea2.setFont(new java.awt.Font("Lucida Handwriting", 3, 13)); // NOI18N jTextArea2.setRows(5); jTextArea2.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)); jScrollPane2.setViewportView(jTextArea2); getContentPane().add(jScrollPane2); jScrollPane2.setBounds(80, 500, 680, 90); jLabel6.setBackground(new java.awt.Color(255, 51, 0)); jLabel6.setFont(new java.awt.Font("Lucida Handwriting", 3, 13)); // NOI18N jLabel6.setText("Messages :"); getContentPane().add(jLabel6); jLabel6.setBounds(90, 480, 80, 19); jButton4.setFont(new java.awt.Font("Lucida Handwriting", 3, 14)); // NOI18N jButton4.setText("Share via Email"); jButton4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton4ActionPerformed(evt); } }); getContentPane().add(jButton4); jButton4.setBounds(290, 450, 160, 30); jCheckBox2.setFont(new java.awt.Font("Lucida Handwriting", 3, 14)); // NOI18N jCheckBox2.setText("My Team"); getContentPane().add(jCheckBox2); jCheckBox2.setBounds(310, 360, 120, 23); jCheckBox3.setFont(new java.awt.Font("Lucida Handwriting", 3, 14)); // NOI18N jCheckBox3.setText("Friends"); getContentPane().add(jCheckBox3); jCheckBox3.setBounds(310, 390, 120, 25); jCheckBox4.setFont(new java.awt.Font("Lucida Handwriting", 3, 14)); // NOI18N jCheckBox4.setText("Family"); getContentPane().add(jCheckBox4); jCheckBox4.setBounds(310, 420, 87, 25); jLabel5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/my/swingconnect/Backgroundtemp.jpg"))); // NOI18N jLabel5.setText("jLabel5"); getContentPane().add(jLabel5); jLabel5.setBounds(0, 0, 860, 660); jOptionPane1.setBackground(new java.awt.Color(0, 0, 255)); jOptionPane1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jOptionPane1.setForeground(new java.awt.Color(255, 0, 0)); getContentPane().add(jOptionPane1); jOptionPane1.setBounds(30, 70, 20, 20); setBounds(0, 0, 861, 673); }
From source file:streaming.swing.JDialogSerie.java
/** * 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./*from w w w . java 2 s .co m*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel2 = new javax.swing.JLabel(); jPanel3 = new javax.swing.JPanel(); jTextFieldID = new javax.swing.JTextField(); jLabel3 = new javax.swing.JLabel(); jPanel4 = new javax.swing.JPanel(); jTextTitre = new javax.swing.JTextField(); jLabel1 = new javax.swing.JLabel(); jPanel1 = new javax.swing.JPanel(); jComboBox1 = new javax.swing.JComboBox<>(); jLabel4 = new javax.swing.JLabel(); jPanel6 = new javax.swing.JPanel(); jTextSynopsis = new javax.swing.JTextField(); jLabel5 = new javax.swing.JLabel(); jPanel7 = new javax.swing.JPanel(); jComboBoxSaison = new javax.swing.JComboBox<>(); jPanel8 = new javax.swing.JPanel(); jPanel9 = new javax.swing.JPanel(); jBAjouter = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("Genre"); getContentPane().setLayout(new java.awt.GridLayout(6, 3)); jLabel2.setText("ID"); getContentPane().add(jLabel2); javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup(jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 209, Short.MAX_VALUE)); jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 81, Short.MAX_VALUE)); getContentPane().add(jPanel3); jTextFieldID.setEditable(false); jTextFieldID.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextFieldIDActionPerformed(evt); } }); getContentPane().add(jTextFieldID); jLabel3.setText("Titre"); getContentPane().add(jLabel3); javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4); jPanel4.setLayout(jPanel4Layout); jPanel4Layout.setHorizontalGroup(jPanel4Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 209, Short.MAX_VALUE)); jPanel4Layout.setVerticalGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 81, Short.MAX_VALUE)); getContentPane().add(jPanel4); jTextTitre.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextTitreActionPerformed(evt); } }); getContentPane().add(jTextTitre); jLabel1.setText("Pays"); getContentPane().add(jLabel1); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 209, Short.MAX_VALUE)); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 81, Short.MAX_VALUE)); getContentPane().add(jPanel1); jComboBox1.setModel( new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); jComboBox1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jComboBox1ActionPerformed(evt); } }); getContentPane().add(jComboBox1); jLabel4.setText("Synopsis"); getContentPane().add(jLabel4); javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6); jPanel6.setLayout(jPanel6Layout); jPanel6Layout.setHorizontalGroup(jPanel6Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 209, Short.MAX_VALUE)); jPanel6Layout.setVerticalGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 81, Short.MAX_VALUE)); getContentPane().add(jPanel6); jTextSynopsis.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextSynopsisActionPerformed(evt); } }); getContentPane().add(jTextSynopsis); jLabel5.setText("Saison"); getContentPane().add(jLabel5); javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7); jPanel7.setLayout(jPanel7Layout); jPanel7Layout.setHorizontalGroup(jPanel7Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 209, Short.MAX_VALUE)); jPanel7Layout.setVerticalGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 81, Short.MAX_VALUE)); getContentPane().add(jPanel7); jComboBoxSaison.setModel( new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); jComboBoxSaison.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jComboBoxSaisonActionPerformed(evt); } }); getContentPane().add(jComboBoxSaison); javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8); jPanel8.setLayout(jPanel8Layout); jPanel8Layout.setHorizontalGroup(jPanel8Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 209, Short.MAX_VALUE)); jPanel8Layout.setVerticalGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 81, Short.MAX_VALUE)); getContentPane().add(jPanel8); javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9); jPanel9.setLayout(jPanel9Layout); jPanel9Layout.setHorizontalGroup(jPanel9Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 209, Short.MAX_VALUE)); jPanel9Layout.setVerticalGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 81, Short.MAX_VALUE)); getContentPane().add(jPanel9); jBAjouter.setText("Ajouter"); jBAjouter.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBAjouterActionPerformed(evt); } }); getContentPane().add(jBAjouter); pack(); }
From source file:de.andreasgiemza.jgeagle.panels.DeleteImagesPanel.java
/** * 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./*from w ww. java 2s . c om*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { descriptionLabel = new javax.swing.JLabel(); sizeLabel = new javax.swing.JLabel(); imagesComboBox = new javax.swing.JComboBox(); deleteButton = new javax.swing.JButton(); descriptionLabel.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N descriptionLabel.setText("Image folder size:"); sizeLabel.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N sizeLabel.setForeground(new java.awt.Color(204, 0, 0)); imagesComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "All images", "Diff images" })); deleteButton.setText("Delete"); deleteButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { deleteButtonActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(imagesComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(deleteButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup().addComponent(descriptionLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent( sizeLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE))) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(descriptionLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(sizeLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(18, 18, 18) .addComponent(imagesComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(deleteButton) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); }
From source file:bemap.trackInfoPanel.java
/** * 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.//from ww w. j a v a2 s . c o m */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); jPanel1.setPreferredSize(new java.awt.Dimension(1000, 400)); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 758, Short.MAX_VALUE)); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 400, 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().addContainerGap() .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 758, Short.MAX_VALUE) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addComponent(jPanel1, 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(); }
From source file:com.facebook.buck.util.zip.ZipScrubberTest.java
@Test public void modificationZip64Times() throws Exception { ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); byte[] data = "data1".getBytes(Charsets.UTF_8); try (ZipOutputStream out = new ZipOutputStream(byteArrayOutputStream)) { for (long i = 0; i < 2 * Short.MAX_VALUE + 1; i++) { ZipEntry entry = new ZipEntry("file" + i); entry.setSize(data.length);//from www .j a v a 2s.c o m out.putNextEntry(entry); out.write(data); out.closeEntry(); } } byte[] bytes = byteArrayOutputStream.toByteArray(); ZipScrubber.scrubZipBuffer(bytes.length, ByteBuffer.wrap(bytes)); // Iterate over each of the entries, expecting to see all zeros in the time fields. Date dosEpoch = new Date(ZipUtil.dosToJavaTime(ZipConstants.DOS_FAKE_TIME)); try (ZipInputStream is = new ZipInputStream(new ByteArrayInputStream(bytes))) { for (ZipEntry entry = is.getNextEntry(); entry != null; entry = is.getNextEntry()) { assertThat(entry.getName(), new Date(entry.getTime()), Matchers.equalTo(dosEpoch)); } } }