List of usage examples for javax.swing GroupLayout createSequentialGroup
public SequentialGroup createSequentialGroup()
From source file:metodosnumericos.VentanaMetododeNewton.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.ja v a 2 s . c o m */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); txtX0 = new javax.swing.JTextField(); txtTolerancia = new javax.swing.JTextField(); txtIteraciones = new javax.swing.JTextField(); jButton1 = new javax.swing.JButton(); butCalcular = new javax.swing.JButton(); jLabel1 = new javax.swing.JLabel(); txtFdx = new javax.swing.JTextField(); jTabbedPane1 = new javax.swing.JTabbedPane(); panelGrafica = new javax.swing.JPanel(); canvas1 = new java.awt.Canvas(); panelTabla = new javax.swing.JPanel(); jButton2 = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jLabel2.setText("Xo:"); jLabel3.setText("Tolerancia:"); jLabel4.setText("Iteraciones:"); txtX0.setText("Xo"); txtTolerancia.setText("Tolerancia"); txtIteraciones.setText("Iteraciones"); jButton1.setText("< Atrs"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); butCalcular.setText("Calcular"); butCalcular.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { butCalcularActionPerformed(evt); } }); jLabel1.setText("f'(x)="); txtFdx.setText("f'(x)"); panelGrafica.add(canvas1); jTabbedPane1.addTab("Grafica", panelGrafica); panelTabla.setLayout(new java.awt.BorderLayout()); jTabbedPane1.addTab("Tabla", panelTabla); jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/info.png"))); // NOI18N jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); 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) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel3).addComponent(jLabel2).addComponent(jLabel4) .addComponent(jLabel1)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(txtX0).addComponent(txtTolerancia) .addComponent(txtIteraciones, javax.swing.GroupLayout.DEFAULT_SIZE, 95, Short.MAX_VALUE) .addComponent(txtFdx))) .addGroup(layout.createSequentialGroup().addComponent(jButton1).addGap(53, 53, 53) .addComponent(butCalcular)) .addGroup(layout.createSequentialGroup().addGap(4, 4, 4).addComponent(jButton2))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 391, 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(jButton2).addGap(39, 39, 39) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2).addComponent(txtX0, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel3).addComponent(txtTolerancia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel4).addComponent(txtIteraciones, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1).addComponent(txtFdx, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton1).addComponent(butCalcular)) .addContainerGap()) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addGap(0, 36, Short.MAX_VALUE).addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 327, javax.swing.GroupLayout.PREFERRED_SIZE))); pack(); }
From source file:Interface.FoodCollectionSupervisor.TypesOfFoodRestaurant.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./* ww w . j av a 2 s. com*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel3 = new javax.swing.JLabel(); btnCalculate = new javax.swing.JButton(); jDateChooser1 = new com.toedter.calendar.JDateChooser(); jDateChooser2 = new com.toedter.calendar.JDateChooser(); jLabel2 = new javax.swing.JLabel(); jLabel1 = new javax.swing.JLabel(); btnBack1 = new javax.swing.JButton(); jLabel3.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jLabel3.setText("To Date"); btnCalculate.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N btnCalculate.setText("View Results >>"); btnCalculate.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnCalculateActionPerformed(evt); } }); jDateChooser1.setFocusCycleRoot(true); jDateChooser1.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jDateChooser2.setFocusCycleRoot(true); jDateChooser2.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jLabel2.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jLabel2.setText("From Date"); jLabel1.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N jLabel1.setText("Types of Food donated by all the Commercial bodies in a date range"); btnBack1.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N btnBack1.setText("<< Back"); btnBack1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnBack1ActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addGap(127, 127, 127).addComponent(jLabel1).addGap(90, 90, 90)) .addGroup(layout.createSequentialGroup().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGap(73, 73, 73).addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addComponent(jLabel2).addGap(18, 18, 18) .addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jDateChooser2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jDateChooser1, javax.swing.GroupLayout.PREFERRED_SIZE, 190, javax.swing.GroupLayout.PREFERRED_SIZE))) .addComponent(jLabel3)).addGap(103, 103, 103).addComponent(btnCalculate)) .addGroup(layout.createSequentialGroup().addContainerGap().addComponent(btnBack1))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(87, 87, 87) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(layout.createSequentialGroup().addGap(6, 6, 6) .addComponent(jLabel2)) .addComponent(jDateChooser1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel3).addComponent(jDateChooser2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(layout.createSequentialGroup().addGap(83, 83, 83) .addComponent(btnCalculate))) .addGap(409, 409, 409).addComponent(btnBack1).addContainerGap())); }
From source file:FormularioGuardarEstudio.java
@SuppressWarnings({ "unchecked", "rawtypes" }) private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner Evaluation license - verdura henrion label1 = new JLabel(); pacientesCombo = new JComboBox(obtenerPacientes().toArray()); label2 = new JLabel(); label3 = new JLabel(); label4 = new JLabel(); label5 = new JLabel(); nombreEstudio = new JTextField(); scrollPane1 = new JScrollPane(); descripcion = new JTextArea(); descripcion.setLineWrap(true);//from ww w . j a v a 2 s . c o m descripcion.setWrapStyleWord(true); notas = new JTextArea(); notas.setLineWrap(true); notas.setWrapStyleWord(true); button1 = new JButton(); mensajeRespuesta = new JLabel(); //======== this ======== setTitle("Guardar Estudio"); Container contentPane = getContentPane(); //---- label1 ---- label1.setText("Paciente:"); label1.setFont(new Font("Calibri", Font.BOLD, 14)); //---- label2 ---- label2.setText("Datos del Estudio"); label2.setFont(new Font("Calibri", Font.BOLD, 14)); //---- label3 ---- label3.setText("Nombre Del Estudio:"); //---- label4 ---- label4.setText("Descripci\u00f3n:"); //---- label5 ---- label5.setText("Notas:"); //======== scrollPane1 ======== { scrollPane1.setViewportView(descripcion); } //---- button1 ---- button1.setText("Guardar Estudio"); button1.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { clickGuardarEstudio(e); } }); //---- mensajeRespuesta ---- mensajeRespuesta.setText("_"); mensajeRespuesta.setHorizontalAlignment(SwingConstants.CENTER); GroupLayout contentPaneLayout = new GroupLayout(contentPane); contentPane.setLayout(contentPaneLayout); contentPaneLayout.setHorizontalGroup(contentPaneLayout.createParallelGroup().addGroup(contentPaneLayout .createSequentialGroup() .addGroup(contentPaneLayout.createParallelGroup().addGroup(contentPaneLayout.createSequentialGroup() .addContainerGap().addGroup(contentPaneLayout.createParallelGroup().addComponent(label4) .addComponent(label1, GroupLayout.PREFERRED_SIZE, 85, GroupLayout.PREFERRED_SIZE) .addComponent( pacientesCombo, GroupLayout.PREFERRED_SIZE, 73, GroupLayout.PREFERRED_SIZE) .addComponent(label2) .addGroup(contentPaneLayout.createSequentialGroup().addComponent(label3) .addGap(18, 18, 18).addComponent(nombreEstudio, GroupLayout.PREFERRED_SIZE, 140, GroupLayout.PREFERRED_SIZE)) .addGroup(contentPaneLayout.createSequentialGroup().addComponent(label5) .addGroup(contentPaneLayout.createParallelGroup().addGroup(contentPaneLayout .createSequentialGroup().addGap(83, 83, 83) .addGroup(contentPaneLayout .createParallelGroup(GroupLayout.Alignment.LEADING, false) .addComponent(scrollPane1, GroupLayout.DEFAULT_SIZE, 256, Short.MAX_VALUE) .addComponent(notas, GroupLayout.DEFAULT_SIZE, 256, Short.MAX_VALUE))) .addGroup(contentPaneLayout.createSequentialGroup() .addGap(48, 48, 48).addComponent(mensajeRespuesta, GroupLayout.PREFERRED_SIZE, 215, GroupLayout.PREFERRED_SIZE)))))) .addGroup(contentPaneLayout.createSequentialGroup().addGap(142, 142, 142) .addComponent(button1))) .addContainerGap(18, Short.MAX_VALUE))); contentPaneLayout.setVerticalGroup(contentPaneLayout.createParallelGroup() .addGroup(contentPaneLayout.createSequentialGroup().addContainerGap() .addComponent(label1, GroupLayout.PREFERRED_SIZE, 23, GroupLayout.PREFERRED_SIZE) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addComponent(pacientesCombo, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18).addComponent(label2).addGap(18, 18, 18) .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(label3).addComponent(nombreEstudio, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(contentPaneLayout.createParallelGroup().addComponent(label4).addComponent( scrollPane1, GroupLayout.PREFERRED_SIZE, 78, GroupLayout.PREFERRED_SIZE)) .addGap(11, 11, 11) .addGroup(contentPaneLayout.createParallelGroup().addComponent(label5).addComponent(notas, GroupLayout.PREFERRED_SIZE, 76, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(mensajeRespuesta, GroupLayout.DEFAULT_SIZE, 17, Short.MAX_VALUE) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(button1) .addContainerGap())); pack(); setLocationRelativeTo(getOwner()); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:TextFieldDemo.java
/** * This method is called from within the constructor to initialize the form. *//*from www . j av a 2 s . co m*/ private void initComponents() { entry = new JTextField(); textArea = new JTextArea(); status = new JLabel(); jLabel1 = new JLabel(); setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); setTitle("TextFieldDemo"); textArea.setColumns(20); textArea.setLineWrap(true); textArea.setRows(5); textArea.setWrapStyleWord(true); textArea.setEditable(false); jScrollPane1 = new JScrollPane(textArea); jLabel1.setText("Enter text to search:"); GroupLayout layout = new GroupLayout(getContentPane()); getContentPane().setLayout(layout); // Create a parallel group for the horizontal axis ParallelGroup hGroup = layout.createParallelGroup(GroupLayout.Alignment.LEADING); // Create a sequential and a parallel groups SequentialGroup h1 = layout.createSequentialGroup(); ParallelGroup h2 = layout.createParallelGroup(GroupLayout.Alignment.TRAILING); // Add a container gap to the sequential group h1 h1.addContainerGap(); // Add a scroll pane and a label to the parallel group h2 h2.addComponent(jScrollPane1, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 450, Short.MAX_VALUE); h2.addComponent(status, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 450, Short.MAX_VALUE); // Create a sequential group h3 SequentialGroup h3 = layout.createSequentialGroup(); h3.addComponent(jLabel1); h3.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED); h3.addComponent(entry, GroupLayout.DEFAULT_SIZE, 321, Short.MAX_VALUE); // Add the group h3 to the group h2 h2.addGroup(h3); // Add the group h2 to the group h1 h1.addGroup(h2); h1.addContainerGap(); // Add the group h1 to the hGroup hGroup.addGroup(GroupLayout.Alignment.TRAILING, h1); // Create the horizontal group layout.setHorizontalGroup(hGroup); // Create a parallel group for the vertical axis ParallelGroup vGroup = layout.createParallelGroup(GroupLayout.Alignment.LEADING); // Create a sequential group v1 SequentialGroup v1 = layout.createSequentialGroup(); // Add a container gap to the sequential group v1 v1.addContainerGap(); // Create a parallel group v2 ParallelGroup v2 = layout.createParallelGroup(GroupLayout.Alignment.BASELINE); v2.addComponent(jLabel1); v2.addComponent(entry, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE); // Add the group v2 tp the group v1 v1.addGroup(v2); v1.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED); v1.addComponent(jScrollPane1, GroupLayout.DEFAULT_SIZE, 233, Short.MAX_VALUE); v1.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED); v1.addComponent(status); v1.addContainerGap(); // Add the group v1 to the group vGroup vGroup.addGroup(v1); // Create the vertical group layout.setVerticalGroup(vGroup); pack(); }
From source file:vista.DestinosMasConsultados.java
public void iniciarGraficos(CategoryDataset dataset) { // create the chart... final JFreeChart chart = ChartFactory.createBarChart("Paises mas consultados", // chart title "Paises", // domain axis label "Cantidad de consultas", // range axis label dataset, // data PlotOrientation.VERTICAL, // orientation true, // include legend true, // tooltips? false // URLs? );/* ww w .j ava 2 s.c o m*/ // NOW DO SOME OPTIONAL CUSTOMISATION OF THE CHART... // set the background color for the chart... chart.setBackgroundPaint(Color.white); // get a reference to the plot for further customisation... final CategoryPlot plot = chart.getCategoryPlot(); plot.setBackgroundPaint(Color.lightGray); plot.setDomainGridlinePaint(Color.white); plot.setRangeGridlinePaint(Color.white); // set the range axis to display integers only... final NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis(); rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits()); // disable bar outlines... final BarRenderer renderer = (BarRenderer) plot.getRenderer(); renderer.setDrawBarOutline(false); // set up gradient paints for series... final GradientPaint gp0 = new GradientPaint(0.0f, 0.0f, Color.blue, 0.0f, 0.0f, Color.lightGray); final GradientPaint gp1 = new GradientPaint(0.0f, 0.0f, Color.green, 0.0f, 0.0f, Color.lightGray); final GradientPaint gp2 = new GradientPaint(0.0f, 0.0f, Color.red, 0.0f, 0.0f, Color.lightGray); renderer.setSeriesPaint(0, gp0); renderer.setSeriesPaint(1, gp1); renderer.setSeriesPaint(2, gp2); final CategoryAxis domainAxis = plot.getDomainAxis(); domainAxis.setCategoryLabelPositions(CategoryLabelPositions.createUpRotationLabelPositions(Math.PI / 6.0)); ChartPanel chartFinal = new ChartPanel(chart); chartFinal.setSize(new Dimension(600, 400)); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(panelDestinosMasConsultados); panelDestinosMasConsultados.setLayout(jPanel1Layout); jPanel1Layout .setHorizontalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addGap(0, 0, 0).addComponent(chartFinal) .addContainerGap(0, Short.MAX_VALUE))); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addGap(0, 0, 0).addComponent(chartFinal) .addContainerGap(0, Short.MAX_VALUE))); }
From source file:view.PlotterView.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 a v a 2 s . com */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { chartJPanel = new javax.swing.JPanel(); xAxisVariableJComboBox = new javax.swing.JComboBox<>(); jLabel1 = new javax.swing.JLabel(); startJButton = new javax.swing.JButton(); filePathJTextField = new javax.swing.JTextField(); jLabel2 = new javax.swing.JLabel(); quantityJComboBox = new javax.swing.JComboBox<>(); jLabel3 = new javax.swing.JLabel(); sizeJComboBox = new javax.swing.JComboBox<>(); jLabel4 = new javax.swing.JLabel(); typeJComboBox = new javax.swing.JComboBox<>(); jLabel5 = new javax.swing.JLabel(); machineJComboBox = new javax.swing.JComboBox<>(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("Result Plotter"); setResizable(false); chartJPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder()); chartJPanel.setLayout(new java.awt.BorderLayout()); xAxisVariableJComboBox.setModel( new javax.swing.DefaultComboBoxModel<>(new String[] { "Quantity", "Size", "Type", "Machine" })); xAxisVariableJComboBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { xAxisVariableJComboBoxActionPerformed(evt); } }); jLabel1.setText(" X-axis Variable:"); startJButton.setText("Start"); filePathJTextField.setToolTipText("Path to file"); jLabel2.setText("Quantity:"); quantityJComboBox .setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "10", "50", "100", "200" })); jLabel3.setText("Size:"); sizeJComboBox.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "1mb", "10mb", "50mb" })); jLabel4.setText("Type:"); typeJComboBox.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Binary", "Textual" })); jLabel5.setText("Mquina:"); machineJComboBox .setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "caio", "dilts", "Jonathan" })); 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) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addGap(0, 0, Short.MAX_VALUE).addComponent(startJButton, javax.swing.GroupLayout.PREFERRED_SIZE, 510, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(xAxisVariableJComboBox, 0, 164, Short.MAX_VALUE) .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(quantityJComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(sizeJComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(typeJComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup().addComponent(jLabel4) .addGap(0, 0, Short.MAX_VALUE)) .addComponent(machineJComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(filePathJTextField).addComponent(chartJPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 510, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(xAxisVariableJComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18).addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(quantityJComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jLabel3) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(sizeJComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jLabel4) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(typeJComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jLabel5) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(machineJComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(chartJPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 284, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(filePathJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(startJButton).addContainerGap(50, Short.MAX_VALUE))); pack(); }
From source file:com.ecrimebureau.Web.JIFPing.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. ja va 2s .c o m*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jSplitPane1 = new javax.swing.JSplitPane(); jPanel2 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); jTextArea1 = new javax.swing.JTextArea(); jTFIP = new javax.swing.JTextField(); jBPing = new javax.swing.JButton(); jPanel1 = new javax.swing.JPanel(); jSpinner1 = new javax.swing.JSpinner(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jSpinnerN = new javax.swing.JSpinner(); jLabel3 = new javax.swing.JLabel(); jSpinner3 = new javax.swing.JSpinner(); jLabel4 = new javax.swing.JLabel(); jSpinner4 = new javax.swing.JSpinner(); setClosable(true); setIconifiable(true); setMaximizable(true); setResizable(true); setTitle("Ping"); getContentPane().setLayout(new java.awt.CardLayout()); jSplitPane1.setDividerLocation(450); jTextArea1.setColumns(20); jTextArea1.setRows(5); jScrollPane1.setViewportView(jTextArea1); jTFIP.setText("127.0.0.1"); jBPing.setText("Ping"); jBPing.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBPingActionPerformed(evt); } }); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup(jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup().addGap(195, 195, 195).addComponent(jBPing).addGap(0, 50, Short.MAX_VALUE)) .addGroup(jPanel2Layout.createSequentialGroup().addContainerGap() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jTFIP, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jScrollPane1)) .addContainerGap())); jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup() .addContainerGap() .addComponent(jTFIP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jBPing) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 396, Short.MAX_VALUE))); jSplitPane1.setLeftComponent(jPanel2); jPanel1.setBorder(null); jSpinner1.setToolTipText("Number of times to ping"); jLabel1.setText("-t"); jLabel2.setText("-n"); jSpinnerN.setToolTipText("Number of echo requests to send."); jSpinnerN.setValue(5); jSpinnerN.setVerifyInputWhenFocusTarget(false); jLabel3.setText("-l"); jLabel4.setText("-f"); jSpinner4.setToolTipText("Don't Fragment flag in packet (IPv4-only)."); 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() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(jPanel1Layout.createSequentialGroup().addComponent(jLabel3) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jSpinner3, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel1Layout.createSequentialGroup().addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jSpinner1, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(18, 18, 18) .addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addGroup(jPanel1Layout.createSequentialGroup().addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jSpinnerN, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel1Layout.createSequentialGroup().addComponent(jLabel4) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jSpinner4, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(72, Short.MAX_VALUE))); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel1) .addComponent(jSpinner1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2).addComponent(jSpinnerN, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel3) .addComponent(jSpinner3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jSpinner4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel4)) .addContainerGap(408, Short.MAX_VALUE))); jSplitPane1.setRightComponent(jPanel1); getContentPane().add(jSplitPane1, "card2"); pack(); }
From source file:gui.configurar.GerarAssinatura.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.//ww w .ja va2 s. c om */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jScrollPane1 = new javax.swing.JScrollPane(); jTextArea1 = new javax.swing.JTextArea(); jLabel1 = new javax.swing.JLabel(); jTextField1 = new javax.swing.JTextField(); jButton1 = new javax.swing.JButton(); jLabel2 = new javax.swing.JLabel(); tSenha = new javax.swing.JTextField(); jLabel3 = new javax.swing.JLabel(); tContribuinte = new javax.swing.JTextField(); tDev = new javax.swing.JTextField(); jLabel4 = new javax.swing.JLabel(); jButton2 = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jTextArea1.setColumns(20); jTextArea1.setRows(5); jScrollPane1.setViewportView(jTextArea1); jLabel1.setText("Certificado"); jTextField1.setEditable(false); jButton1.setText("Selecionar"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jLabel2.setText("Senha"); jLabel3.setText("CNPJ Contribuinte"); jLabel4.setText("CNPJ Desenvolvedor"); jButton2.setText("Gerar Assinatura Digital"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addGap(0, 0, Short.MAX_VALUE).addComponent(jButton2) .addGap(12, 12, 12)) .addGroup(layout.createSequentialGroup().addContainerGap().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel3).addComponent(jLabel4)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent(tDev).addComponent(tContribuinte))) .addGroup(layout.createSequentialGroup().addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jTextField1, javax.swing.GroupLayout.DEFAULT_SIZE, 108, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(tSenha, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap()) .addGroup(layout.createSequentialGroup().addComponent(jScrollPane1).addGap(12, 12, 12))))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup( javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addContainerGap().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel1) .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButton1).addComponent(jLabel2).addComponent(tSenha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel3).addComponent(tContribuinte, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel4).addComponent(tDev, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jButton2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 155, Short.MAX_VALUE) .addContainerGap())); pack(); }
From source file:UserInterface.PublisherRole.ViewUserHabitsJPanel.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 . j a v a2s . c o m*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { backjButton2 = new javax.swing.JButton(); jScrollPane1 = new javax.swing.JScrollPane(); userHabitsJTable = new javax.swing.JTable(); viewUserHabitsJButton = new javax.swing.JButton(); jLabel1 = new javax.swing.JLabel(); jScrollPane2 = new javax.swing.JScrollPane(); userAccountsJTable = new javax.swing.JTable(); UserHabitsJPanel = new javax.swing.JPanel(); backjButton2.setText("<<Back"); backjButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { backjButton2ActionPerformed(evt); } }); userHabitsJTable.setModel(new javax.swing.table.DefaultTableModel( new Object[][] { { null, null }, { null, null }, { null, null }, { null, null } }, new String[] { "Tags of Websites visited", "Number of Visits" }) { boolean[] canEdit = new boolean[] { false, false }; public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit[columnIndex]; } }); jScrollPane1.setViewportView(userHabitsJTable); viewUserHabitsJButton.setText("View User Habits"); viewUserHabitsJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { viewUserHabitsJButtonActionPerformed(evt); } }); jLabel1.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N jLabel1.setText("User Habits"); userAccountsJTable.setModel(new javax.swing.table.DefaultTableModel( new Object[][] { { null }, { null }, { null }, { null } }, new String[] { "User Accounts" }) { boolean[] canEdit = new boolean[] { false }; public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit[columnIndex]; } }); jScrollPane2.setViewportView(userAccountsJTable); javax.swing.GroupLayout UserHabitsJPanelLayout = new javax.swing.GroupLayout(UserHabitsJPanel); UserHabitsJPanel.setLayout(UserHabitsJPanelLayout); UserHabitsJPanelLayout.setHorizontalGroup(UserHabitsJPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE)); UserHabitsJPanelLayout.setVerticalGroup(UserHabitsJPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 285, Short.MAX_VALUE)); 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().addComponent(backjButton2) .addContainerGap()) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGap(378, 378, 378) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(UserHabitsJPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup().addGap(129, 129, 129).addComponent(jLabel1)) .addComponent(viewUserHabitsJButton, javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 362, Short.MAX_VALUE) .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 362, Short.MAX_VALUE)) .addGap(305, 305, 305))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap().addComponent(jLabel1).addGap(54, 54, 54) .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(28, 28, 28).addComponent(viewUserHabitsJButton).addGap(18, 18, 18) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(37, 37, 37) .addComponent(UserHabitsJPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(83, 83, 83).addComponent(backjButton2).addContainerGap())); }
From source file:FinalProject.Employee_Login.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 a v a2 s . c o m*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel1 = new javax.swing.JLabel(); Employee_Input = new javax.swing.JTextField(); jLabel2 = new javax.swing.JLabel(); Password_Input = new javax.swing.JPasswordField(); Back_Button = new javax.swing.JButton(); Submit_Button = new javax.swing.JButton(); Error_Message = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jLabel1.setFont(new java.awt.Font("KG Blank Space Solid", 0, 12)); // NOI18N jLabel1.setText("Employee ID:"); Employee_Input.addInputMethodListener(new java.awt.event.InputMethodListener() { public void caretPositionChanged(java.awt.event.InputMethodEvent evt) { } public void inputMethodTextChanged(java.awt.event.InputMethodEvent evt) { Employee_InputInputMethodTextChanged(evt); } }); Employee_Input.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Employee_InputActionPerformed(evt); } }); jLabel2.setFont(new java.awt.Font("KG Blank Space Solid", 0, 12)); // NOI18N jLabel2.setText("Password:"); Password_Input.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Password_InputActionPerformed(evt); } }); Back_Button.setFont(new java.awt.Font("KG Blank Space Solid", 0, 12)); // NOI18N Back_Button.setText("Back"); Back_Button.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Back_ButtonActionPerformed(evt); } }); Submit_Button.setFont(new java.awt.Font("KG Blank Space Solid", 0, 12)); // NOI18N Submit_Button.setText("Submit"); Submit_Button.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Submit_ButtonActionPerformed(evt); } }); Error_Message.setForeground(new java.awt.Color(255, 0, 51)); Error_Message.setText("Incorrect ID and/ or Password"); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(Back_Button) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(Submit_Button).addGap(35, 35, 35)) .addGroup(layout.createSequentialGroup().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGap(24, 24, 24).addComponent(Error_Message)) .addGroup(layout.createSequentialGroup().addGap(36, 36, 36).addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jLabel2).addComponent(jLabel1) .addComponent(Employee_Input, javax.swing.GroupLayout.DEFAULT_SIZE, 140, Short.MAX_VALUE) .addComponent(Password_Input, javax.swing.GroupLayout.DEFAULT_SIZE, 140, Short.MAX_VALUE)))) .addContainerGap(24, Short.MAX_VALUE))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGap(24, 24, 24).addComponent(jLabel1).addGap(0, 0, 0) .addComponent(Employee_Input, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18).addComponent(jLabel2).addGap(0, 0, 0) .addComponent(Password_Input, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(Error_Message, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(Back_Button).addComponent(Submit_Button)) .addGap(18, 18, 18))); pack(); }