List of usage examples for javax.swing GroupLayout createParallelGroup
public ParallelGroup createParallelGroup(Alignment alignment)
From source file:com.jimaginary.machine.graph.params.PoissonParamPropertyPanel.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 2s. c o m */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel1 = new javax.swing.JLabel(); jPanelChart = new javax.swing.JPanel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jTextFieldMean = new javax.swing.JTextField(); jTextFieldMax = new javax.swing.JTextField(); jSliderMean = new javax.swing.JSlider(); setBackground(new java.awt.Color(255, 255, 255)); org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle .getMessage(PoissonParamPropertyPanel.class, "PoissonParamPropertyPanel.jLabel1.text")); // NOI18N jPanelChart.setBackground(new java.awt.Color(204, 204, 204)); jPanelChart.setBorder(javax.swing.BorderFactory.createEtchedBorder()); javax.swing.GroupLayout jPanelChartLayout = new javax.swing.GroupLayout(jPanelChart); jPanelChart.setLayout(jPanelChartLayout); jPanelChartLayout.setHorizontalGroup(jPanelChartLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE)); jPanelChartLayout.setVerticalGroup(jPanelChartLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 196, Short.MAX_VALUE)); org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle .getMessage(PoissonParamPropertyPanel.class, "PoissonParamPropertyPanel.jLabel2.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(jLabel3, org.openide.util.NbBundle .getMessage(PoissonParamPropertyPanel.class, "PoissonParamPropertyPanel.jLabel3.text")); // NOI18N jTextFieldMean.setText(org.openide.util.NbBundle.getMessage(PoissonParamPropertyPanel.class, "PoissonParamPropertyPanel.jTextFieldMean.text")); // NOI18N jTextFieldMean.setEnabled(false); jTextFieldMax.setText(org.openide.util.NbBundle.getMessage(PoissonParamPropertyPanel.class, "PoissonParamPropertyPanel.jTextFieldMax.text")); // NOI18N jTextFieldMax.setEnabled(false); jSliderMean.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { jSliderMeanStateChanged(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(jPanelChart, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 388, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup() .addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 54, Short.MAX_VALUE) .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jTextFieldMax, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE)) .addGroup(layout.createSequentialGroup() .addComponent(jTextFieldMean, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jSliderMean, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(layout.createSequentialGroup().addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanelChart, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2).addComponent(jTextFieldMean, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addComponent(jSliderMean, 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(jTextFieldMax, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel3)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); }
From source file:org.nekorp.workflow.desktop.view.DamageDetailCaptureView.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 a 2 s .co m */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { categoria = new javax.swing.ButtonGroup(); caracteristica = new org.nekorp.workflow.desktop.view.binding.SimpleBindableJComboBox(); jPanel1 = new javax.swing.JPanel(); minimo = new org.nekorp.workflow.desktop.view.binding.SimpleBindableJRadioButton("Minimo"); medio = new org.nekorp.workflow.desktop.view.binding.SimpleBindableJRadioButton("Medio"); maximo = new org.nekorp.workflow.desktop.view.binding.SimpleBindableJRadioButton("Mximo"); aceptar = new javax.swing.JButton(); cancelar = new javax.swing.JButton(); setBackground(new java.awt.Color(255, 255, 255)); caracteristica.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N caracteristica.setModel(new javax.swing.DefaultComboBoxModel( new String[] { "Talln", "Hundimiento", "Rayon", "Dobles", "Dao estructural" })); caracteristica.setBorder(null); jPanel1.setBackground(new java.awt.Color(255, 255, 255)); jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder( javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 255, 255)), "Categoria", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Arial", 0, 11))); // NOI18N minimo.setBackground(new java.awt.Color(255, 255, 255)); categoria.add(minimo); minimo.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N minimo.setText("Minimo"); medio.setBackground(new java.awt.Color(255, 255, 255)); categoria.add(medio); medio.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N medio.setText("Medio"); maximo.setBackground(new java.awt.Color(255, 255, 255)); categoria.add(maximo); maximo.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N maximo.setText("Mximo"); 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) .addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(minimo).addComponent(medio).addComponent(maximo)))); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addComponent(minimo) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(medio) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(maximo))); aceptar.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N aceptar.setText("Aceptar"); aceptar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { aceptarActionPerformed(evt); } }); cancelar.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N cancelar.setText("Cancelar"); cancelar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cancelarActionPerformed(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) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(caracteristica, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addGap(0, 0, Short.MAX_VALUE).addComponent(aceptar) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(cancelar))) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(caracteristica, 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(cancelar).addComponent(aceptar)) .addGap(0, 11, Short.MAX_VALUE))); }
From source file:com.mirth.connect.client.ui.ChannelFilter.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 a 2 s . co m*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); filterTable = new com.mirth.connect.client.ui.components.ItemSelectionTable(); okButton = new javax.swing.JButton(); cancelButton = new javax.swing.JButton(); invertButton = new javax.swing.JButton(); enableFilterCheckbox = new javax.swing.JCheckBox(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("Channel Filter"); jPanel1.setBackground(new java.awt.Color(255, 255, 255)); filterTable.setModel(new javax.swing.table.DefaultTableModel(new Object[][] { }, new String[] { })); filterTable.setEnabled(false); jScrollPane1.setViewportView(filterTable); okButton.setText("OK"); okButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { okButtonActionPerformed(evt); } }); cancelButton.setText("Cancel"); cancelButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cancelButtonActionPerformed(evt); } }); invertButton.setText("Invert Selection"); invertButton.setEnabled(false); invertButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { invertButtonActionPerformed(evt); } }); enableFilterCheckbox.setBackground(new java.awt.Color(255, 255, 255)); enableFilterCheckbox.setText("Enable Channel Filter"); enableFilterCheckbox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { enableFilterCheckboxActionPerformed(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().addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jScrollPane1) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addComponent(invertButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 131, Short.MAX_VALUE) .addComponent(cancelButton, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(okButton, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(enableFilterCheckbox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE))) .addContainerGap())); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap() .addComponent(enableFilterCheckbox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(8, 8, 8) .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 197, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(okButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(cancelButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(invertButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(12, 12, 12))); 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(0, 0, 0).addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(0, 0, 0))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGap(0, 0, 0).addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(0, 0, 0))); pack(); }
From source file:qmod.generator.MainWindow.java
@SuppressWarnings("unchecked") public MainWindow() { setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setTitle("Quick Mod Generator"); JLabel lblAuthors = new JLabel("Authors:"); authorField1 = new JTextField(); authorField1.setColumns(25);/*from ww w .j a v a2s . co m*/ JButton btnGenerateFile = new JButton("Generate File"); btnGenerateFile.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { writeFiles(); } }); authCombo1.setFont(new Font("Dialog", Font.BOLD, 8)); authCombo1.setModel( (ComboBoxModel<Object>) new DefaultComboBoxModel<Object>(new String[] { "Author", "Maintainer" })); authCombo1.setSelectedIndex(0); authCombo2.setFont(new Font("Dialog", Font.BOLD, 8)); authCombo2.setModel( (ComboBoxModel<Object>) new DefaultComboBoxModel<Object>(new String[] { "Author", "Maintainer" })); authCombo2.setSelectedIndex(0); authorField2 = new JTextField(); authorField2.setColumns(25); authCombo3.setFont(new Font("Dialog", Font.BOLD, 8)); authCombo3.setModel( (ComboBoxModel<Object>) new DefaultComboBoxModel<Object>(new String[] { "Author", "Maintainer" })); authCombo3.setSelectedIndex(0); authorField3 = new JTextField(); authorField3.setColumns(25); JLabel lblCategories = new JLabel("Categories:"); categoriesField = new JTextField(); categoriesField.setColumns(10); JLabel lblDescription = new JLabel("Description:"); JEditorPane descriptionField = new JEditorPane(); JLabel lblLicense = new JLabel("License:"); licenseField = new JTextField(); licenseField.setColumns(10); GroupLayout groupLayout = new GroupLayout(getContentPane()); groupLayout.setHorizontalGroup(groupLayout.createParallelGroup(Alignment.LEADING) .addGroup(groupLayout.createSequentialGroup().addContainerGap() .addGroup(groupLayout.createParallelGroup(Alignment.LEADING).addGroup(groupLayout .createSequentialGroup() .addGroup(groupLayout.createParallelGroup(Alignment.LEADING).addGroup(groupLayout .createParallelGroup(Alignment.TRAILING).addComponent(btnGenerateFile) .addGroup(groupLayout.createSequentialGroup().addComponent(lblAuthors) .addPreferredGap(ComponentPlacement.RELATED).addGroup(groupLayout .createParallelGroup(Alignment.LEADING).addGroup(groupLayout .createSequentialGroup() .addComponent( authCombo2, GroupLayout.PREFERRED_SIZE, 81, GroupLayout.PREFERRED_SIZE) .addGap(6).addComponent(authorField2, GroupLayout.PREFERRED_SIZE, 192, GroupLayout.PREFERRED_SIZE)) .addGroup(groupLayout.createSequentialGroup().addComponent( authCombo1, GroupLayout.PREFERRED_SIZE, 81, GroupLayout.PREFERRED_SIZE).addPreferredGap( ComponentPlacement.RELATED) .addComponent( authorField1, GroupLayout.DEFAULT_SIZE, 264, Short.MAX_VALUE)) .addGroup(groupLayout.createSequentialGroup() .addComponent(authCombo3, GroupLayout.PREFERRED_SIZE, 81, GroupLayout.PREFERRED_SIZE) .addGap(6).addGroup(groupLayout.createParallelGroup( Alignment.LEADING).addComponent( descriptionField) .addGroup(groupLayout .createParallelGroup( Alignment.LEADING, false) .addComponent(categoriesField) .addComponent( authorField3, GroupLayout.DEFAULT_SIZE, 192, Short.MAX_VALUE)) .addGroup(groupLayout .createSequentialGroup() .addComponent(licenseField, GroupLayout.DEFAULT_SIZE, 192, Short.MAX_VALUE) .addPreferredGap( ComponentPlacement.RELATED))))))) .addComponent(lblCategories).addComponent(lblDescription)) .addGap(84)) .addGroup(groupLayout.createSequentialGroup().addComponent(lblLicense) .addContainerGap(377, Short.MAX_VALUE))))); groupLayout.setVerticalGroup(groupLayout.createParallelGroup(Alignment.LEADING).addGroup(groupLayout .createSequentialGroup().addContainerGap() .addGroup(groupLayout.createParallelGroup(Alignment.BASELINE).addComponent(lblAuthors) .addComponent(authorField1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(authCombo1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(ComponentPlacement.RELATED) .addGroup(groupLayout.createParallelGroup(Alignment.LEADING) .addComponent(authCombo2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addGroup(groupLayout.createSequentialGroup().addGap(3).addComponent(authorField2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))) .addPreferredGap(ComponentPlacement.RELATED) .addGroup(groupLayout.createParallelGroup(Alignment.LEADING) .addComponent(authCombo3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addGroup(groupLayout.createSequentialGroup().addGap(3).addComponent(authorField3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))) .addPreferredGap(ComponentPlacement.RELATED) .addGroup(groupLayout.createParallelGroup(Alignment.LEADING).addComponent(lblCategories) .addComponent(categoriesField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(ComponentPlacement.RELATED) .addGroup(groupLayout.createParallelGroup(Alignment.LEADING).addComponent(lblDescription) .addComponent(descriptionField, GroupLayout.PREFERRED_SIZE, 100, GroupLayout.PREFERRED_SIZE)) .addGroup(groupLayout.createParallelGroup(Alignment.LEADING) .addGroup(groupLayout.createSequentialGroup().addGap(9).addComponent(lblLicense)) .addGroup(groupLayout.createSequentialGroup().addPreferredGap(ComponentPlacement.RELATED) .addComponent(licenseField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))) .addPreferredGap(ComponentPlacement.RELATED, 322, Short.MAX_VALUE).addComponent(btnGenerateFile) .addContainerGap())); getContentPane().setLayout(groupLayout); JMenuBar menuBar = new JMenuBar(); setJMenuBar(menuBar); JMenu mnFile = new JMenu("File"); mnFile.setMnemonic('F'); menuBar.add(mnFile); JMenuItem mntmNew = new JMenuItem("New"); mntmNew.setMnemonic(KeyEvent.VK_N); mnFile.add(mntmNew); JMenuItem mntmOpen = new JMenuItem("Open"); mnFile.add(mntmOpen); JMenuItem mntmSave = new JMenuItem("Save"); mnFile.add(mntmSave); JMenuItem mntmExit = new JMenuItem("Exit"); mntmExit.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { System.exit(0); } }); mntmExit.setMnemonic(KeyEvent.VK_X); mnFile.add(mntmExit); }
From source file:ANNFileDetect.detectFile.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 www . j av a2 s . c o m */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { FileBox = new javax.swing.JTextField(); jButton1 = new javax.swing.JButton(); Result = new javax.swing.JLabel(); ResField = new javax.swing.JTextField(); jLabel1 = new javax.swing.JLabel(); Detection = new javax.swing.JButton(); GPanel = new javax.swing.JPanel(); jButton2 = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jButton1.setText("Choose file to identify"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); Result.setText("Result:"); ResField.setEnabled(false); jLabel1.setText("Result Breakdown"); Detection.setText("Detect!"); Detection.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { DetectionActionPerformed(evt); } }); javax.swing.GroupLayout GPanelLayout = new javax.swing.GroupLayout(GPanel); GPanel.setLayout(GPanelLayout); GPanelLayout.setHorizontalGroup(GPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 0, Short.MAX_VALUE)); GPanelLayout.setVerticalGroup(GPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 272, Short.MAX_VALUE)); jButton2.setText("Get detailed results"); 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) .addComponent(GPanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(ResField) .addGroup(layout.createSequentialGroup().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(layout.createSequentialGroup() .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 178, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(FileBox, javax.swing.GroupLayout.PREFERRED_SIZE, 623, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jLabel1).addComponent(Result) .addComponent(Detection, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addComponent(jButton2)).addGap(0, 0, Short.MAX_VALUE))) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton1).addComponent(FileBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(9, 9, 9).addComponent(Detection).addGap(18, 18, 18).addComponent(Result) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(ResField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(GPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jButton2) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); pack(); }
From source file:org.cytoscape.dyn.internal.graphMetrics.GraphMetricsPanel.java
public GraphMetricsPanel(org.cytoscape.dyn.internal.CyActivator<T, C> cyActivator, DynNetwork<T> dynamicNetwork) { this.cyactivator = cyActivator; this.dynamicNetwork = dynamicNetwork; attributesTable = new JTable(new MyTableModel(dynamicNetwork.getNodeAttributes())); attributesTable.setPreferredScrollableViewportSize(new Dimension(300, 400)); attributesTable.setFillsViewportHeight(true); attributesTable.setShowGrid(false);//from ww w . j a v a2 s . co m JScrollPane tablePanel = new JScrollPane(attributesTable); tablePanel.setSize(new Dimension(250, 400)); edgeAttributesTable = new JTable(new MyTableModel(dynamicNetwork.getEdgeAttributes())); edgeAttributesTable.setPreferredScrollableViewportSize(new Dimension(300, 400)); edgeAttributesTable.setFillsViewportHeight(true); edgeAttributesTable.setShowGrid(false); JScrollPane edgeTablePanel = new JScrollPane(edgeAttributesTable); edgeTablePanel.setSize(new Dimension(250, 400)); plotChartButton = new JButton("Plot Selected Attributes"); closeTab = new JButton("Close Tab"); plotChartButton.addActionListener(this); closeTab.addActionListener(this); buttonPanel = new JPanel(); buttonPanel.setLayout(new FlowLayout()); buttonPanel.add(plotChartButton); buttonPanel.add(closeTab); buttonPanel.setBorder(BorderFactory.createTitledBorder(null, "Options", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, new Font("SansSerif", 0, 12), Color.darkGray)); tablePanel.setBorder( BorderFactory.createTitledBorder(null, "Node Attributes", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, new Font("SansSerif", 0, 12), Color.darkGray)); edgeTablePanel.setBorder( BorderFactory.createTitledBorder(null, "Edge Attributes", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, new Font("SansSerif", 0, 12), Color.darkGray)); GroupLayout cytoLayout = new GroupLayout(this); this.setLayout(cytoLayout); this.add(tablePanel); this.add(buttonPanel); cytoLayout.setHorizontalGroup(cytoLayout.createParallelGroup(GroupLayout.Alignment.LEADING) .addComponent(tablePanel, GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE) .addComponent(edgeTablePanel, GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE) .addComponent(buttonPanel, GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE)); cytoLayout.setVerticalGroup( cytoLayout.createSequentialGroup().addComponent(tablePanel, 200, GroupLayout.DEFAULT_SIZE, 300) .addComponent(edgeTablePanel, 200, GroupLayout.DEFAULT_SIZE, 300) .addComponent(buttonPanel, GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE)); this.setVisible(true); }
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 . co m */ @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:org.nekorp.workflow.desktop.view.EvidenciaEventoView.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 a 2 s. co m */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jToolBar1 = new javax.swing.JToolBar(); filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); nueva = new javax.swing.JButton(); navigate = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); previewContent = new javax.swing.JPanel(); image = new javax.swing.JPanel(); setBackground(new java.awt.Color(255, 255, 255)); jToolBar1.setBackground(new java.awt.Color(102, 102, 102)); jToolBar1.setFloatable(false); jToolBar1.setRollover(true); jToolBar1.add(filler1); nueva.setBackground(new java.awt.Color(102, 102, 102)); nueva.setForeground(new java.awt.Color(255, 255, 255)); nueva.setText("Nueva Imagen"); nueva.setFocusable(false); nueva.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); nueva.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); nueva.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { nuevaActionPerformed(evt); } }); jToolBar1.add(nueva); navigate.setBackground(new java.awt.Color(102, 102, 102)); navigate.setLayout(new java.awt.BorderLayout()); jScrollPane1.setBackground(new java.awt.Color(102, 102, 102)); jScrollPane1.setBorder(null); jScrollPane1.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS); jScrollPane1.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER); previewContent.setBackground(new java.awt.Color(102, 102, 102)); previewContent.setLayout(new javax.swing.BoxLayout(previewContent, javax.swing.BoxLayout.X_AXIS)); jScrollPane1.setViewportView(previewContent); navigate.add(jScrollPane1, java.awt.BorderLayout.CENTER); image.setBackground(new java.awt.Color(255, 255, 255)); image.setMaximumSize(new java.awt.Dimension(900, 600)); image.setLayout(new java.awt.BorderLayout()); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jToolBar1, javax.swing.GroupLayout.DEFAULT_SIZE, 980, Short.MAX_VALUE) .addComponent(navigate, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(image, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, 0) .addComponent(image, javax.swing.GroupLayout.DEFAULT_SIZE, 395, Short.MAX_VALUE) .addGap(0, 0, 0).addComponent(navigate, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE))); }
From source file:com.akman.excel.view.frmSelectImage.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. c om*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); lblImage = new javax.swing.JLabel(); txtPath = new javax.swing.JTextField(); btnSelectImage = new javax.swing.JButton(); btnSave = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jPanel1.setBackground(new java.awt.Color(255, 255, 255)); jLabel1.setBackground(new java.awt.Color(0, 102, 153)); jLabel1.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jLabel1.setForeground(new java.awt.Color(255, 255, 255)); jLabel1.setText(" Select Image File"); jLabel1.setOpaque(true); lblImage.setBackground(new java.awt.Color(102, 102, 102)); lblImage.setOpaque(true); txtPath.setEnabled(false); btnSelectImage.setText("Attach Image"); btnSelectImage.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnSelectImageActionPerformed(evt); } }); btnSave.setText("Save"); btnSave.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnSaveActionPerformed(evt); } }); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel1Layout.createSequentialGroup().addGap(47, 47, 47) .addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(lblImage, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(txtPath, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE) .addComponent(btnSelectImage, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 128, Short.MAX_VALUE) .addComponent(btnSave, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap(61, Short.MAX_VALUE))); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(lblImage, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(48, 48, 48) .addComponent(txtPath, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnSelectImage, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE) .addGap(30, 30, 30).addComponent(btnSave, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap())); 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)); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent( jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); pack(); setLocationRelativeTo(null); }
From source file:UserInterface.FinanceRole.DonationsReceivedJPanel.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.//w ww .j a v a 2 s . c om */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jScrollPane1 = new javax.swing.JScrollPane(); donationsJTable = new javax.swing.JTable(); backJButton4 = new javax.swing.JButton(); titleJLabel = new javax.swing.JLabel(); totalDonationJTextField = new javax.swing.JTextField(); title2JLabel = new javax.swing.JLabel(); donationJPanel = new javax.swing.JPanel(); setBackground(new java.awt.Color(255, 255, 255)); donationsJTable.setModel(new javax.swing.table.DefaultTableModel(new Object[][] { }, new String[] { "Transaction ID", "Donor Name", "Donor UserName", "Donation Amount", "Transaction Date" }) { boolean[] canEdit = new boolean[] { false, false, false, false, false }; public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit[columnIndex]; } }); jScrollPane1.setViewportView(donationsJTable); if (donationsJTable.getColumnModel().getColumnCount() > 0) { donationsJTable.getColumnModel().getColumn(0).setResizable(false); donationsJTable.getColumnModel().getColumn(1).setResizable(false); donationsJTable.getColumnModel().getColumn(2).setResizable(false); donationsJTable.getColumnModel().getColumn(3).setResizable(false); donationsJTable.getColumnModel().getColumn(4).setResizable(false); } backJButton4.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N backJButton4.setText("<< Back"); backJButton4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { backJButton4ActionPerformed(evt); } }); titleJLabel.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N titleJLabel.setText("Donation Details"); totalDonationJTextField.setEditable(false); totalDonationJTextField.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N title2JLabel.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N title2JLabel.setText("Total Donations Received:"); javax.swing.GroupLayout donationJPanelLayout = new javax.swing.GroupLayout(donationJPanel); donationJPanel.setLayout(donationJPanelLayout); donationJPanelLayout.setHorizontalGroup(donationJPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE)); donationJPanelLayout.setVerticalGroup(donationJPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 315, 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().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGap(406, 406, 406).addComponent(titleJLabel)) .addGroup(layout.createSequentialGroup().addGap(50, 50, 50).addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(backJButton4) .addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addGroup(layout.createSequentialGroup() .addComponent(title2JLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 234, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18).addComponent(totalDonationJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 141, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 836, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createSequentialGroup() .addComponent(donationJPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(9, 9, 9)))))) .addContainerGap(106, Short.MAX_VALUE))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGap(22, 22, 22).addComponent(titleJLabel) .addGap(34, 34, 34) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 218, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(title2JLabel).addComponent(totalDonationJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(19, 19, 19) .addComponent(donationJPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18).addComponent(backJButton4).addContainerGap(87, Short.MAX_VALUE))); }