List of usage examples for javax.swing GroupLayout createParallelGroup
public ParallelGroup createParallelGroup(Alignment alignment)
From source file:monitor.StatsWindow.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 . ja v a 2 s. c o m*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jScrollPane1 = new javax.swing.JScrollPane(); jTree1 = new javax.swing.JTree(); jProgressBar1 = new javax.swing.JProgressBar(); jButtonQuit = new javax.swing.JButton(); jButtonRefresh = new javax.swing.JButton(); jPanelDiagram = new javax.swing.JPanel(); jScrollPane2 = new javax.swing.JScrollPane(); jTextAreaNGramWords = new javax.swing.JTextArea(); jPanelDiagram2 = new javax.swing.JPanel(); jScrollPane3 = new javax.swing.JScrollPane(); jTextAreaSufiksWords = new javax.swing.JTextArea(); jScrollPane1.setViewportView(jTree1); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jButtonQuit.setText("Quit"); jButtonQuit.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonQuitActionPerformed(evt); } }); jButtonRefresh.setText("Refresh"); jButtonRefresh.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonRefreshActionPerformed(evt); } }); jPanelDiagram.setBackground(new java.awt.Color(153, 153, 153)); jPanelDiagram.setLayout(new java.awt.BorderLayout()); jTextAreaNGramWords.setColumns(20); jTextAreaNGramWords.setRows(5); jScrollPane2.setViewportView(jTextAreaNGramWords); jPanelDiagram2.setBackground(new java.awt.Color(153, 153, 153)); jPanelDiagram2.setLayout(new java.awt.BorderLayout()); jTextAreaSufiksWords.setColumns(20); jTextAreaSufiksWords.setRows(5); jScrollPane3.setViewportView(jTextAreaSufiksWords); 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(jButtonQuit) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 586, Short.MAX_VALUE) .addComponent(jButtonRefresh)) .addGroup(layout.createSequentialGroup() .addGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jPanelDiagram, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 350, Short.MAX_VALUE)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanelDiagram2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jScrollPane3)))) .addContainerGap())); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanelDiagram, javax.swing.GroupLayout.PREFERRED_SIZE, 253, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jPanelDiagram2, javax.swing.GroupLayout.PREFERRED_SIZE, 253, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 118, Short.MAX_VALUE) .addComponent(jScrollPane3)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButtonQuit).addComponent(jButtonRefresh)) .addContainerGap())); pack(); }
From source file:jsonbrowse.JsonBrowse.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 v a 2s. c o m */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jScrollPane = new javax.swing.JScrollPane(); jTree = new javax.swing.JTree(); jButtonQuit = new javax.swing.JButton(); jWatchForChanges = new javax.swing.JCheckBox(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jScrollPane.setViewportView(jTree); jButtonQuit.setText("Quit"); jButtonQuit.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonQuitActionPerformed(evt); } }); jWatchForChanges.setSelected(true); jWatchForChanges.setText("Watch file for changes"); jWatchForChanges.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jWatchForChangesActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup().addComponent(jWatchForChanges) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButtonQuit))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 269, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButtonQuit).addComponent(jWatchForChanges)))); pack(); }
From source file:Graph_with_jframe_and_arduino.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 ava 2 s. c om */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 400, Short.MAX_VALUE)); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 300, Short.MAX_VALUE)); pack(); }
From source file:com.jtk.medicalrecord.view.panel.InputMedrecPemeriksaanpendukung.java
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor./*from w w w . jav 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(); jLabel2 = new javax.swing.JLabel(); btnTambah = new javax.swing.JButton(); btnHapus = new javax.swing.JButton(); jScrollPane3 = new javax.swing.JScrollPane(); tblFile = new javax.swing.JTable(); setBackground(new java.awt.Color(255, 255, 255)); setBorder(javax.swing.BorderFactory.createEtchedBorder()); setMinimumSize(new java.awt.Dimension(240, 500)); setPreferredSize(new java.awt.Dimension(240, 650)); jLabel1.setFont(new java.awt.Font("Segoe UI", 1, 18)); // NOI18N jLabel1.setText("Pemeriksaan Pendukung"); jLabel2.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N jLabel2.setText("File"); btnTambah.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N btnTambah.setIcon( new javax.swing.ImageIcon(getClass().getResource("/com/jtk/medicalrecord/image/plus.png"))); // NOI18N btnTambah.setText("Tambah"); btnTambah.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnTambahActionPerformed(evt); } }); btnHapus.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N btnHapus.setIcon( new javax.swing.ImageIcon(getClass().getResource("/com/jtk/medicalrecord/image/trash.png"))); // NOI18N btnHapus.setText("Hapus"); btnHapus.setMaximumSize(new java.awt.Dimension(93, 25)); btnHapus.setMinimumSize(new java.awt.Dimension(93, 25)); btnHapus.setPreferredSize(new java.awt.Dimension(93, 25)); btnHapus.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnHapusActionPerformed(evt); } }); jScrollPane3.setMaximumSize(new java.awt.Dimension(164, 32767)); jScrollPane3.setMinimumSize(new java.awt.Dimension(164, 23)); jScrollPane3.setPreferredSize(new java.awt.Dimension(164, 100)); tblFile.setFont(new java.awt.Font("Segoe UI", 0, 11)); // NOI18N tblFile.setModel(new javax.swing.table.DefaultTableModel(new Object[][] { }, new String[] { "Nama File", "Tipe File" })); jScrollPane3.setViewportView(tblFile); 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(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup() .addComponent(btnHapus, 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) .addComponent(btnTambah)) .addGroup(layout.createSequentialGroup() .addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel2).addComponent(jLabel1)) .addGap(0, 6, Short.MAX_VALUE))) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addComponent(jLabel1).addGap(12, 12, 12) .addComponent(jLabel2).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 205, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(btnTambah).addComponent(btnHapus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(352, Short.MAX_VALUE))); }
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.//from w ww . j a v a 2s . c o m */ @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:components.TextFieldDemo.java
/** This method is called from within the constructor to * initialize the form./*from ww w. 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: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 ww .j a va 2s.co 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(); }
From source file:cz.moz.ctmanager.main.MainAppFrame.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 va 2 s. co m */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jScrollPane1 = new javax.swing.JScrollPane(); contactTable = new javax.swing.JTable(); addContactButton = new javax.swing.JButton(); removeContactButton = new javax.swing.JButton(); importExportButton = new javax.swing.JButton(); detailsButton = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); contactTable.setModel(new javax.swing.table.DefaultTableModel(new Object[][] { }, new String[] { "ID", "First Name", "Last Name", "Address" }) { Class[] types = new Class[] { java.lang.Integer.class, java.lang.String.class, java.lang.String.class, java.lang.Object.class }; boolean[] canEdit = new boolean[] { false, false, false, false }; public Class getColumnClass(int columnIndex) { return types[columnIndex]; } public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit[columnIndex]; } }); jScrollPane1.setViewportView(contactTable); addContactButton.setText("Add Contact"); addContactButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { addContactButtonActionPerformed(evt); } }); removeContactButton.setText("Remove Contact"); removeContactButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { removeContactButtonActionPerformed(evt); } }); importExportButton.setText("Import/Export"); importExportButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { importExportButtonActionPerformed(evt); } }); detailsButton.setText("Details..."); detailsButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { detailsButtonActionPerformed(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(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 556, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(addContactButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(removeContactButton, javax.swing.GroupLayout.DEFAULT_SIZE, 137, Short.MAX_VALUE) .addComponent(importExportButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(detailsButton, 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.LEADING) .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 550, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup() .addComponent(addContactButton, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(removeContactButton, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(importExportButton, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(detailsButton, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE))) .addContainerGap())); pack(); }
From source file:com.floreantpos.ui.dialog.LicenseDialog.java
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor./* www. ja v a2 s. c o m*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { this.setTitle("License Key POS"); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); idTF = new javax.swing.JTextField(); keyTF = new javax.swing.JTextField(); saveBtn = new javax.swing.JButton(); cancelBtn = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); //if (StringUtils.isEmpty(AppConfig.getMachineId())) { try { String[] nets = new Sigar().getNetInterfaceList(); NetInterfaceConfig c = new Sigar().getNetInterfaceConfig(nets[0]); Base64 base64 = new Base64(true); String machineId = base64.encodeAsString(c.getHwaddr().getBytes()).trim().toUpperCase(); idTF.setText(machineId); } catch (Exception e) { e.printStackTrace(); } // } // else { // idTF.setText(AppConfig.getMachineId()); // } jLabel1.setText("ID Mesin"); jLabel2.setText("License Key"); saveBtn.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N saveBtn.setText("S a v e"); saveBtn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { saveBtnActionPerformed(evt); } }); cancelBtn.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N cancelBtn.setText("C a n c e l"); cancelBtn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cancelBtnActionPerformed(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().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel1).addComponent(jLabel2)) .addGap(31, 31, 31) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(idTF).addComponent(keyTF))) .addGroup(layout.createSequentialGroup().addGap(90, 90, 90) .addComponent(saveBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(32, 32, 32).addComponent(cancelBtn).addGap(0, 49, Short.MAX_VALUE))) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGap(61, 61, 61) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1).addComponent(idTF, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(32, 32, 32) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2).addComponent(keyTF, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 46, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(saveBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(cancelBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(45, 45, 45))); pack(); }
From source file:pe.egcc.eureka.app.view.RepoResumen.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 a2s.c o m*/ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel1 = new javax.swing.JLabel(); txtSucursal = new javax.swing.JTextField(); jLabel2 = new javax.swing.JLabel(); txtMoneda = new javax.swing.JTextField(); btnEjecutar = new javax.swing.JButton(); panelReporte = new javax.swing.JPanel(); setClosable(true); setIconifiable(true); setMaximizable(true); setResizable(true); setTitle("RESUMEN DE OPERACIONES"); jLabel1.setText("Sucursal:"); jLabel2.setText("Moneda:"); btnEjecutar.setText("Ejecutar"); btnEjecutar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnEjecutarActionPerformed(evt); } }); javax.swing.GroupLayout panelReporteLayout = new javax.swing.GroupLayout(panelReporte); panelReporte.setLayout(panelReporteLayout); panelReporteLayout.setHorizontalGroup(panelReporteLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE)); panelReporteLayout.setVerticalGroup(panelReporteLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 400, Short.MAX_VALUE)); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(panelReporte, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup() .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(txtSucursal, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(txtMoneda, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(btnEjecutar).addGap(0, 305, 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(jLabel1) .addComponent(txtSucursal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2) .addComponent(txtMoneda, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(btnEjecutar)).addGap(18, 18, 18) .addComponent(panelReporte, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap())); pack(); }