List of usage examples for javax.swing GroupLayout createSequentialGroup
public SequentialGroup createSequentialGroup()
From source file:EspectroForm.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() { spectroPanel = new javax.swing.JPanel(); okButton = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setMaximumSize(new java.awt.Dimension(500, 375)); setMinimumSize(new java.awt.Dimension(500, 375)); setResizable(false); javax.swing.GroupLayout spectroPanelLayout = new javax.swing.GroupLayout(spectroPanel); spectroPanel.setLayout(spectroPanelLayout); spectroPanelLayout.setHorizontalGroup(spectroPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 540, Short.MAX_VALUE)); spectroPanelLayout.setVerticalGroup(spectroPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 390, Short.MAX_VALUE)); okButton.setText("OK"); okButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { okButtonActionPerformed(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() .addComponent(spectroPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addGap(198, 198, 198).addComponent(okButton, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(199, 199, 199))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addComponent(spectroPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(18, 18, 18).addComponent(okButton).addGap(33, 33, 33))); pack(); }
From source file:diplomawork.controler.MainWindow.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 w w.j a va2 s.co m */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jInternalFrame1 = new javax.swing.JInternalFrame(); jButton1 = new javax.swing.JButton(); jInternalFrame2 = new javax.swing.JInternalFrame(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jInternalFrame1.setVisible(true); javax.swing.GroupLayout jInternalFrame1Layout = new javax.swing.GroupLayout( jInternalFrame1.getContentPane()); jInternalFrame1.getContentPane().setLayout(jInternalFrame1Layout); jInternalFrame1Layout.setHorizontalGroup(jInternalFrame1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 398, Short.MAX_VALUE)); jInternalFrame1Layout.setVerticalGroup(jInternalFrame1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE)); jButton1.setText("jButton1"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jInternalFrame2.setVisible(true); javax.swing.GroupLayout jInternalFrame2Layout = new javax.swing.GroupLayout( jInternalFrame2.getContentPane()); jInternalFrame2.getContentPane().setLayout(jInternalFrame2Layout); jInternalFrame2Layout.setHorizontalGroup(jInternalFrame2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 380, Short.MAX_VALUE)); jInternalFrame2Layout.setVerticalGroup(jInternalFrame2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 695, Short.MAX_VALUE)); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jInternalFrame1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jInternalFrame2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jButton1)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jInternalFrame2).addComponent(jInternalFrame1)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 53, Short.MAX_VALUE) .addComponent(jButton1))); pack(); }
From source file:au.org.ala.delta.intkey.ui.AddOrEditDataIndexItemDialog.java
private void init() { ActionMap actionMap = Application.getInstance().getContext().getActionMap(this); ResourceMap resourceMap = Application.getInstance().getContext() .getResourceMap(AddOrEditDataIndexItemDialog.class); resourceMap.injectFields(this); _pnlMain = new JPanel(); getContentPane().add(_pnlMain, BorderLayout.CENTER); _lblDescription = new JLabel(descriptionCaption); _txtFldDescription = new JTextField(); _txtFldDescription.setColumns(10);// w ww . ja v a2s . c o m _btnBrowse = new JButton(); _btnBrowse.setAction(actionMap.get("AddOrEditDataIndexItemDialog_Browse")); _lblFilePath = new JLabel(pathCaption); _txtFldFilePath = new JTextField(); _txtFldFilePath.setColumns(10); GroupLayout gl__pnlMain = new GroupLayout(_pnlMain); gl__pnlMain.setHorizontalGroup(gl__pnlMain.createParallelGroup(Alignment.LEADING).addGroup(gl__pnlMain .createSequentialGroup().addContainerGap() .addGroup(gl__pnlMain.createParallelGroup(Alignment.LEADING, false) .addComponent(_lblFilePath, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(_lblDescription, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(ComponentPlacement.RELATED) .addGroup(gl__pnlMain.createParallelGroup(Alignment.TRAILING) .addGroup(gl__pnlMain.createSequentialGroup() .addComponent(_txtFldFilePath, GroupLayout.DEFAULT_SIZE, 314, Short.MAX_VALUE) .addPreferredGap(ComponentPlacement.RELATED).addComponent(_btnBrowse)) .addComponent(_txtFldDescription, GroupLayout.DEFAULT_SIZE, 77, Short.MAX_VALUE)) .addContainerGap())); gl__pnlMain.setVerticalGroup(gl__pnlMain.createParallelGroup(Alignment.LEADING) .addGroup(gl__pnlMain.createSequentialGroup().addContainerGap() .addGroup(gl__pnlMain.createParallelGroup(Alignment.BASELINE).addComponent(_lblDescription) .addComponent(_txtFldDescription, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addGap(18) .addGroup(gl__pnlMain.createParallelGroup(Alignment.BASELINE) .addComponent(_btnBrowse, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE) .addComponent(_txtFldFilePath, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(_lblFilePath, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)) .addContainerGap(25, Short.MAX_VALUE))); _pnlMain.setLayout(gl__pnlMain); _pnlButtons = new JPanel(); getContentPane().add(_pnlButtons, BorderLayout.SOUTH); _btnOk = new JButton(); _btnOk.setAction(actionMap.get("AddOrEditDataIndexItemDialog_OK")); _pnlButtons.add(_btnOk); _btnCancel = new JButton(); _btnCancel.setAction(actionMap.get("AddOrEditDataIndexItemDialog_Cancel")); _pnlButtons.add(_btnCancel); }
From source file:org.nekorp.workflow.desktop.view.EventoSistemaView.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 ava 2s . c o m*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { nombreEvento = new org.nekorp.workflow.desktop.view.binding.SimpleBindableJLabel(); fechaCreacionLabel = new org.nekorp.workflow.desktop.view.binding.FormatedJLabel(dateConverter); setBackground(new java.awt.Color(255, 255, 255)); setMaximumSize(new java.awt.Dimension(32767, 25)); nombreEvento.setFont(new java.awt.Font("Arial", 1, 11)); // NOI18N nombreEvento.setText(" "); fechaCreacionLabel.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N fechaCreacionLabel.setText("12/12/2012"); 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(nombreEvento, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(fechaCreacionLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(128, Short.MAX_VALUE))); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(nombreEvento).addComponent(fechaCreacionLabel)) .addGap(0, 0, 0))); }
From source file:de.andreasgiemza.jgeagle.panels.DeleteImagesPanel.java
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor./*from w w w. j a v a2 s.co m*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { descriptionLabel = new javax.swing.JLabel(); sizeLabel = new javax.swing.JLabel(); imagesComboBox = new javax.swing.JComboBox(); deleteButton = new javax.swing.JButton(); descriptionLabel.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N descriptionLabel.setText("Image folder size:"); sizeLabel.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N sizeLabel.setForeground(new java.awt.Color(204, 0, 0)); imagesComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "All images", "Diff images" })); deleteButton.setText("Delete"); deleteButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { deleteButtonActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(imagesComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(deleteButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup().addComponent(descriptionLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent( sizeLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE))) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(descriptionLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(sizeLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(18, 18, 18) .addComponent(imagesComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(deleteButton) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); }
From source file:de.alpharogroup.duplicate.files.panels.progressbar.ProgressbarPanel.java
/** * Inits the layout.//from w w w. j a v a 2s .c o m */ private void initLayout() { javax.swing.GroupLayout pnlIconPanelLayout = new javax.swing.GroupLayout(pnlIconPanel); pnlIconPanel.setLayout(pnlIconPanelLayout); pnlIconPanelLayout.setHorizontalGroup(pnlIconPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 44, Short.MAX_VALUE)); pnlIconPanelLayout.setVerticalGroup(pnlIconPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 41, 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(pnlIconPanel, 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.LEADING) .addComponent(lblInfo, javax.swing.GroupLayout.DEFAULT_SIZE, 334, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(btnCancel).addComponent(prgrBrTask, javax.swing.GroupLayout.PREFERRED_SIZE, 334, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGap(21, 21, 21) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(layout.createSequentialGroup().addComponent(lblInfo) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(prgrBrTask, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(pnlIconPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18).addComponent(btnCancel).addContainerGap())); }
From source file:muh.GrafikDeneme.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 a va 2 s .c o m*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); jButton1 = new javax.swing.JButton(); pnlReport = new javax.swing.JPanel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); getContentPane().setLayout(new javax.swing.BoxLayout(getContentPane(), javax.swing.BoxLayout.LINE_AXIS)); jButton1.setText("Show"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); pnlReport.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Report", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("ItalicT", 3, 18))); // NOI18N pnlReport.setLayout(new javax.swing.BoxLayout(pnlReport, javax.swing.BoxLayout.LINE_AXIS)); 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) .addGroup(jPanel1Layout.createSequentialGroup().addComponent(jButton1).addGap(0, 585, Short.MAX_VALUE)) .addComponent(pnlReport, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap())); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup().addContainerGap() .addComponent(pnlReport, javax.swing.GroupLayout.DEFAULT_SIZE, 355, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton1).addContainerGap())); getContentPane().add(jPanel1); pack(); }
From source file:latexstudio.editor.RevisionDisplayTopComponent.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 . jav a2 s.co m*/ */ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jScrollPane1 = new javax.swing.JScrollPane(); rSyntaxTextArea = new org.fife.ui.rsyntaxtextarea.RSyntaxTextArea(); jButton1 = new javax.swing.JButton(); rSyntaxTextArea.setEditable(false); rSyntaxTextArea.setBackground(new java.awt.Color(204, 204, 204)); rSyntaxTextArea.setColumns(20); rSyntaxTextArea.setRows(5); rSyntaxTextArea .setSyntaxEditingStyle(org.openide.util.NbBundle.getMessage(RevisionDisplayTopComponent.class, "RevisionDisplayTopComponent.rSyntaxTextArea.syntaxEditingStyle")); // NOI18N jScrollPane1.setViewportView(rSyntaxTextArea); org.openide.awt.Mnemonics.setLocalizedText(jButton1, org.openide.util.NbBundle .getMessage(RevisionDisplayTopComponent.class, "RevisionDisplayTopComponent.jButton1.text")); // NOI18N jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(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(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup().addGap(0, 0, Short.MAX_VALUE).addComponent( jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 249, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jButton1) .addContainerGap())); }
From source file:io.albraga.namus.OverlaypdfUI.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 av a 2 s . c o m */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jFileChooser1 = new javax.swing.JFileChooser(); jButton1 = new javax.swing.JButton(); jMenuBar1 = new javax.swing.JMenuBar(); jMenu1 = new javax.swing.JMenu(); jMenuItem1 = new javax.swing.JMenuItem(); jMenuItem2 = new javax.swing.JMenuItem(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jButton1.setText("jButton1"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jMenu1.setText("File"); jMenuItem1.setText("Open"); jMenuItem1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem1ActionPerformed(evt); } }); jMenu1.add(jMenuItem1); jMenuItem2.setText("Exit"); jMenuItem2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem2ActionPerformed(evt); } }); jMenu1.add(jMenuItem2); jMenuBar1.add(jMenu1); setJMenuBar(jMenuBar1); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGap(33, 33, 33).addComponent(jButton1) .addContainerGap(294, Short.MAX_VALUE))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGap(37, 37, 37).addComponent(jButton1) .addContainerGap(219, Short.MAX_VALUE))); pack(); }
From source file:com.qualixium.executor.ToolbarPanel.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 .ja v a 2s. c om @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { btnCommandConfig = new javax.swing.JButton(); cbxCommands = new javax.swing.JComboBox(); btnCommandConfig.setIcon( new javax.swing.ImageIcon(getClass().getResource("/com/qualixium/executor/ShellDataIcon.gif"))); // NOI18N btnCommandConfig.setToolTipText("Edit my custom shell commands"); btnCommandConfig.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); btnCommandConfig.setMaximumSize(new java.awt.Dimension(24, 24)); btnCommandConfig.setMinimumSize(new java.awt.Dimension(24, 24)); btnCommandConfig.setPreferredSize(new java.awt.Dimension(30, 24)); btnCommandConfig.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnCommandConfigActionPerformed(evt); } }); cbxCommands.setToolTipText("Execute a shell command"); cbxCommands.setMaximumSize(new java.awt.Dimension(20, 24)); cbxCommands.setMinimumSize(new java.awt.Dimension(20, 24)); cbxCommands.setPreferredSize(new java.awt.Dimension(20, 24)); cbxCommands.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cbxCommandsActionPerformed(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() .addComponent(btnCommandConfig, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(cbxCommands, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(btnCommandConfig, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(cbxCommands, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)); }