List of usage examples for javax.swing GroupLayout setHorizontalGroup
public void setHorizontalGroup(Group group)
From source file:it.unibas.spicygui.vista.TGDListTopComponent.java
private void initComponents() { tabbedPaneTGDs = new javax.swing.JTabbedPane(); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(tabbedPaneTGDs, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE)); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(tabbedPaneTGDs, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)); }
From source file:UserInterface.SearchPatientJPanel.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 v a2 s . c o m*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jScrollPane1 = new javax.swing.JScrollPane(); patientTable = new javax.swing.JTable(); btnGenerateChart = new javax.swing.JButton(); patientTable.setModel(new javax.swing.table.DefaultTableModel(new Object[][] { }, new String[] { "Patient Name", "Patient ID", "Preferred Doctor", "Pharmacy" }) { boolean[] canEdit = new boolean[] { false, false, true, true }; public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit[columnIndex]; } }); jScrollPane1.setViewportView(patientTable); btnGenerateChart.setText("Generate Chart"); btnGenerateChart.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnGenerateChartActionPerformed(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() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGap(30, 30, 30).addComponent( jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 420, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup().addGap(183, 183, 183) .addComponent(btnGenerateChart))) .addContainerGap(315, Short.MAX_VALUE))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGap(36, 36, 36) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18).addComponent(btnGenerateChart).addContainerGap(225, Short.MAX_VALUE))); }
From source file:GraphingProject.TheJApplet.java
/** * This method is called from within the init() method 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 va 2 s . co m @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 760, Short.MAX_VALUE)); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 400, Short.MAX_VALUE)); }
From source file:GUI.PlotHere.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 v a 2 s . c o m*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { GraphHerePanel = new javax.swing.JPanel(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setType(java.awt.Window.Type.POPUP); addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosed(java.awt.event.WindowEvent evt) { formWindowClosed(evt); } }); javax.swing.GroupLayout GraphHerePanelLayout = new javax.swing.GroupLayout(GraphHerePanel); GraphHerePanel.setLayout(GraphHerePanelLayout); GraphHerePanelLayout.setHorizontalGroup(GraphHerePanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 400, Short.MAX_VALUE)); GraphHerePanelLayout.setVerticalGroup(GraphHerePanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 300, Short.MAX_VALUE)); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(GraphHerePanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent( GraphHerePanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); pack(); }
From source file:com.pos.spatobiz.app.view.karyawan.DataKaryawan.java
/** This method is called from within the constructor to * initialize the form.//from w w w . j a va 2s.c om * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { whiteLabel1 = new WhiteLabel(); textSaring = new TextBoxTransfer(); table = new Table(); whiteLabel1.setText("Saring :"); whiteLabel1.setName("whiteLabel1"); // NOI18N textSaring.setName("textSaring"); // NOI18N table.setName("table"); // NOI18N GroupLayout layout = new GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(Alignment.TRAILING, layout .createSequentialGroup().addContainerGap() .addGroup(layout.createParallelGroup(Alignment.TRAILING) .addComponent(table, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 664, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup() .addComponent(whiteLabel1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addPreferredGap(ComponentPlacement.RELATED) .addComponent(textSaring, GroupLayout.DEFAULT_SIZE, 618, Short.MAX_VALUE))) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout .createSequentialGroup().addContainerGap() .addGroup(layout.createParallelGroup(Alignment.BASELINE) .addComponent(whiteLabel1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(textSaring, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(ComponentPlacement.UNRELATED) .addComponent(table, GroupLayout.DEFAULT_SIZE, 163, Short.MAX_VALUE).addContainerGap())); }
From source file:gui.images.ClassifierResultPanel.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 v a 2 s . c o m*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { resultChartPanel = new javax.swing.JPanel(); javax.swing.GroupLayout resultChartPanelLayout = new javax.swing.GroupLayout(resultChartPanel); resultChartPanel.setLayout(resultChartPanelLayout); resultChartPanelLayout.setHorizontalGroup(resultChartPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 223, Short.MAX_VALUE)); resultChartPanelLayout.setVerticalGroup(resultChartPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 216, Short.MAX_VALUE)); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(resultChartPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent( resultChartPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); }
From source file:GeMSE.GS.Analysis.Stats.TwoSamplePearsonsCorrelationPanel.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 o m*/ */ @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(); CovarianceL = new javax.swing.JLabel(); jLabel1.setFont(new java.awt.Font("Lucida Grande", 0, 14)); // NOI18N jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel1.setText("Covariance between the two arrays"); CovarianceL.setFont(new java.awt.Font("Courier New", 0, 24)); // NOI18N CovarianceL.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); CovarianceL.setText("NaN"); 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(CovarianceL, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 336, Short.MAX_VALUE)) .addContainerGap())); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(CovarianceL, javax.swing.GroupLayout.DEFAULT_SIZE, 37, Short.MAX_VALUE) .addContainerGap())); 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(298, Short.MAX_VALUE) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); }
From source file:cmsc105_mp2.Panels.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 . java 2s. c om*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel1 = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); jButton1.setText("Save as PNG"); 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) .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGap(0, 698, Short.MAX_VALUE).addComponent(jButton1))) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 342, Short.MAX_VALUE) .addGap(18, 18, 18).addComponent(jButton1).addContainerGap())); }
From source file:br.com.lnprojetos.springbootswing.ui.MDIApplication.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 2 s .com*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { desktopPane = new javax.swing.JDesktopPane(); menuBar = new javax.swing.JMenuBar(); fileMenu = new javax.swing.JMenu(); openMenuItem = new javax.swing.JMenuItem(); exitMenuItem = new javax.swing.JMenuItem(); helpMenu = new javax.swing.JMenu(); contentMenuItem = new javax.swing.JMenuItem(); aboutMenuItem = new javax.swing.JMenuItem(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); fileMenu.setMnemonic('f'); fileMenu.setText("File"); openMenuItem.setMnemonic('o'); openMenuItem.setText("Cadastro Contatos"); openMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { openMenuItemActionPerformed(evt); } }); fileMenu.add(openMenuItem); exitMenuItem.setMnemonic('x'); exitMenuItem.setText("Sair"); exitMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { exitMenuItemActionPerformed(evt); } }); fileMenu.add(exitMenuItem); menuBar.add(fileMenu); helpMenu.setMnemonic('h'); helpMenu.setText("Help"); contentMenuItem.setMnemonic('c'); contentMenuItem.setText("Contents"); helpMenu.add(contentMenuItem); aboutMenuItem.setMnemonic('a'); aboutMenuItem.setText("About"); helpMenu.add(aboutMenuItem); menuBar.add(helpMenu); setJMenuBar(menuBar); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(desktopPane, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE)); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(desktopPane, javax.swing.GroupLayout.DEFAULT_SIZE, 279, Short.MAX_VALUE)); pack(); }
From source file:layout.Find.java
public Find() { JLabel label = new JLabel("Find What:"); ;//from w w w . j a v a2 s. c om JTextField textField = new JTextField(); JCheckBox caseCheckBox = new JCheckBox("Match Case"); JCheckBox wrapCheckBox = new JCheckBox("Wrap Around"); JCheckBox wholeCheckBox = new JCheckBox("Whole Words"); JCheckBox backCheckBox = new JCheckBox("Search Backwards"); JButton findButton = new JButton("Find"); JButton cancelButton = new JButton("Cancel"); // remove redundant default border of check boxes - they would hinder // correct spacing and aligning (maybe not needed on some look and feels) caseCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); wrapCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); wholeCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); backCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); GroupLayout layout = new GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setAutoCreateGaps(true); layout.setAutoCreateContainerGaps(true); layout.setHorizontalGroup(layout.createSequentialGroup().addComponent(label) .addGroup(layout.createParallelGroup(LEADING).addComponent(textField) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(LEADING).addComponent(caseCheckBox) .addComponent(wholeCheckBox)) .addGroup(layout.createParallelGroup(LEADING).addComponent(wrapCheckBox) .addComponent(backCheckBox)))) .addGroup(layout.createParallelGroup(LEADING).addComponent(findButton).addComponent(cancelButton))); layout.linkSize(SwingConstants.HORIZONTAL, findButton, cancelButton); layout.setVerticalGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(BASELINE).addComponent(label).addComponent(textField) .addComponent(findButton)) .addGroup(layout.createParallelGroup(LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(BASELINE).addComponent(caseCheckBox) .addComponent(wrapCheckBox)) .addGroup(layout.createParallelGroup(BASELINE).addComponent(wholeCheckBox) .addComponent(backCheckBox))) .addComponent(cancelButton))); setTitle("Find"); pack(); setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); }