List of usage examples for javax.swing GroupLayout setVerticalGroup
public void setVerticalGroup(Group group)
From source file:MstrKasKeluar.Entry.java
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); jLabel6 = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); jXTitledPanel1 = new org.jdesktop.swingx.JXTitledPanel(); txt_id = new javax.swing.JTextField(); jLabel5 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel1 = new javax.swing.JLabel(); txt_tgl_keluar = new org.jdesktop.swingx.JXDatePicker(); txt_jum = new javax.swing.JFormattedTextField(); jScrollPane1 = new javax.swing.JScrollPane(); txt_ket = new javax.swing.JEditorPane(); jPanel3 = new javax.swing.JPanel(); btn_simpan = new javax.swing.JButton(); btn_batal = new javax.swing.JButton(); btn_keluar = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); jPanel1.setBackground(new java.awt.Color(53, 73, 178)); jLabel6.setFont(new java.awt.Font("Times New Roman", 1, 24)); // NOI18N jLabel6.setForeground(new java.awt.Color(255, 255, 255)); jLabel6.setText("Entry Data"); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout);/*from w w w .jav a 2 s . co m*/ jPanel1Layout .setHorizontalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addComponent(jLabel6) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel6).addContainerGap())); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup(jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE)); jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 0, Short.MAX_VALUE)); jXTitledPanel1.setTitle("+ Manipulasi Kas Keluar"); jLabel5.setText("Jumlah Uang Rp."); jLabel4.setText("Keterangan"); jLabel2.setText("Tgl Masuk"); jLabel1.setText("Id "); txt_jum.setText("-"); txt_jum.setToolTipText("-"); // NOI18N txt_jum.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N txt_jum.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txt_jumActionPerformed(evt); } }); jScrollPane1.setViewportView(txt_ket); javax.swing.GroupLayout jXTitledPanel1Layout = new javax.swing.GroupLayout( jXTitledPanel1.getContentContainer()); jXTitledPanel1.getContentContainer().setLayout(jXTitledPanel1Layout); jXTitledPanel1Layout.setHorizontalGroup(jXTitledPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jXTitledPanel1Layout.createSequentialGroup().addContainerGap().addGroup( jXTitledPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(27, 27, 27) .addGroup(jXTitledPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jXTitledPanel1Layout.createSequentialGroup() .addComponent(txt_id, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(jXTitledPanel1Layout.createSequentialGroup().addGroup(jXTitledPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(txt_jum, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(txt_tgl_keluar, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(54, 198, Short.MAX_VALUE))))); jXTitledPanel1Layout.setVerticalGroup( jXTitledPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup( javax.swing.GroupLayout.Alignment.TRAILING, jXTitledPanel1Layout.createSequentialGroup().addGroup(jXTitledPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jXTitledPanel1Layout.createSequentialGroup().addGap(9, 9, 9) .addGroup(jXTitledPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1).addComponent(txt_id, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jXTitledPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel2).addComponent(txt_tgl_keluar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel4)) .addGroup(jXTitledPanel1Layout.createSequentialGroup().addGap(63, 63, 63) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(5, 5, 5) .addGroup(jXTitledPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel5).addComponent(txt_jum, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addContainerGap(23, Short.MAX_VALUE))); btn_simpan.setText("Simpan"); btn_simpan.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btn_simpanActionPerformed(evt); } }); btn_batal.setText("Batal"); btn_batal.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btn_batalActionPerformed(evt); } }); btn_keluar.setText("Keluar"); btn_keluar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btn_keluarActionPerformed(evt); } }); javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout .setHorizontalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(btn_simpan) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(btn_batal, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btn_keluar).addContainerGap())); jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(btn_simpan).addComponent(btn_batal).addComponent(btn_keluar)) .addContainerGap())); 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() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jXTitledPanel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(0, 0, 0).addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, 0) .addComponent(jXTitledPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, 0) .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, 0).addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))); pack(); }
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./*from ww w . j av a2 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:pl.piotrsukiennik.jbrain.gui.NewSimulationPanel.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 . com */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { titleInput = new javax.swing.JTextField(); timeInput = new javax.swing.JSlider(); routeInput = new javax.swing.JComboBox(); imageHolder = new javax.swing.JPanel(); jLabel5 = new javax.swing.JLabel(); simulateButton = new javax.swing.JButton(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); setBackground(new java.awt.Color(255, 255, 255)); titleInput.setText("Simulation"); titleInput.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { titleInputActionPerformed(evt); } }); timeInput.setBackground(new java.awt.Color(255, 255, 255)); timeInput.setMaximum(10000); timeInput.setMinimum(100); timeInput.setValue(1000); timeInput.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { timeInputStateChanged(evt); } }); routeInput.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { routeInputActionPerformed(evt); } }); imageHolder.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)); imageHolder.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { imageHolderMouseClicked(evt); } }); jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel5.setText("No input image selected"); javax.swing.GroupLayout imageHolderLayout = new javax.swing.GroupLayout(imageHolder); imageHolder.setLayout(imageHolderLayout); imageHolderLayout.setHorizontalGroup( imageHolderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup( javax.swing.GroupLayout.Alignment.TRAILING, imageHolderLayout.createSequentialGroup().addContainerGap() .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, 356, Short.MAX_VALUE) .addContainerGap())); imageHolderLayout .setVerticalGroup(imageHolderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(imageHolderLayout.createSequentialGroup().addContainerGap() .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, 119, Short.MAX_VALUE) .addContainerGap())); simulateButton.setText("Simulate!"); simulateButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { simulateButtonActionPerformed(evt); } }); jLabel1.setText("Simulation title:"); jLabel2.setText("Simulation time (msec):"); jLabel3.setText("Brain route:"); jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel4.setText("Input image:"); 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(imageHolder, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(simulateButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .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( jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 177, Short.MAX_VALUE) .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, 177, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(titleInput, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(routeInput, javax.swing.GroupLayout.Alignment.TRAILING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(timeInput, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 199, Short.MAX_VALUE))) .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE)) .addContainerGap())); 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.LEADING, false) .addComponent(titleInput, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createSequentialGroup().addGap(3, 3, 3).addComponent(jLabel1, 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) .addComponent(timeInput, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2, 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.BASELINE) .addComponent(routeInput, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(imageHolder, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(simulateButton).addContainerGap())); }
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./*from ww w .j av a 2 s .c o 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:Balo.MainFrame.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 a va 2s . co m*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { Panel_Chart = new javax.swing.JPanel(); Title = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); Table_Dovat = new javax.swing.JTable(); Button_Result = new javax.swing.JButton(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jScrollPane2 = new javax.swing.JScrollPane(); TextAreaGreedy = new javax.swing.JTextArea(); jScrollPane3 = new javax.swing.JScrollPane(); TextAreaDynamic = new javax.swing.JTextArea(); jLabel5 = new javax.swing.JLabel(); TextW = new javax.swing.JTextField(); jButtonAdd = new javax.swing.JButton(); jButtonDelete = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setBackground(new java.awt.Color(235, 242, 253)); Panel_Chart.setBackground(new java.awt.Color(218, 243, 252)); javax.swing.GroupLayout Panel_ChartLayout = new javax.swing.GroupLayout(Panel_Chart); Panel_Chart.setLayout(Panel_ChartLayout); Panel_ChartLayout.setHorizontalGroup(Panel_ChartLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE)); Panel_ChartLayout.setVerticalGroup(Panel_ChartLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE)); Title.setBackground(new java.awt.Color(204, 204, 255)); Title.setFont(new java.awt.Font("Tahoma", 0, 22)); // NOI18N Title.setForeground(new java.awt.Color(255, 0, 51)); Title.setText( "BI TO?N C?I BA L (S? LNG ? VT GII HN) BNG GII THUT THAM N V QUY HOACH ?NG"); jScrollPane1.setViewportView(Table_Dovat); if (Table_Dovat.getColumnModel().getColumnCount() > 0) { Table_Dovat.getColumnModel().getColumn(0).setResizable(false); Table_Dovat.getColumnModel().getColumn(1).setResizable(false); Table_Dovat.getColumnModel().getColumn(2).setResizable(false); Table_Dovat.getColumnModel().getColumn(3).setResizable(false); } Button_Result.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N Button_Result.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Balo/icon_play.png"))); // NOI18N Button_Result.setText("Thc thi"); Button_Result.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { try { Button_ResultActionPerformed(evt); } catch (IOException ex) { Logger.getLogger(MainFrame.class.getName()).log(Level.SEVERE, null, ex); } } }); jLabel1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Balo/checkdb.png"))); // NOI18N jLabel1.setText(" D liu thc nghim"); jLabel2.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Balo/charts-icon.png"))); // NOI18N jLabel2.setText(" Biu "); jLabel3.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N jLabel3.setText("Kt qu gii thut tham n"); jLabel4.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N jLabel4.setText("Kt qu gii thut quy hoch ng"); TextAreaGreedy.setColumns(20); TextAreaGreedy.setRows(5); TextAreaGreedy.setText("? vt - S lng ch?n\n======================"); jScrollPane2.setViewportView(TextAreaGreedy); TextAreaDynamic.setColumns(20); TextAreaDynamic.setRows(5); TextAreaDynamic.setText("? vt - S lng ch?n\n======================"); jScrollPane3.setViewportView(TextAreaDynamic); jLabel5.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N jLabel5.setText("Tr?ng lng: "); TextW.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N TextW.setText("20"); Table_Dovat.setBackground(new java.awt.Color(242, 241, 241)); Table_Dovat.setBorder(javax.swing.BorderFactory.createEtchedBorder()); Table_Dovat.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N Table_Dovat.setForeground(new java.awt.Color(0, 0, 153)); /* Object[] columns = {"Tn vt", "S lng", "Gi tr", "Tr?ng lng"}; model = new DefaultTableModel(); model.setColumnIdentifiers(columns); getDataFileToJTable(); Table_Dovat.setModel(model); */ Table_Dovat.setGridColor(new java.awt.Color(204, 204, 204)); Table_Dovat.setSelectionForeground(new java.awt.Color(204, 255, 204)); jButtonAdd.setText("Thm"); jButtonAdd.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jButtonAddMouseClicked(evt); } }); jButtonDelete.setText("Xa"); jButtonDelete.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jButtonDeleteMouseClicked(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(Title, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout .createSequentialGroup() .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 418, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jButtonDelete, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButtonAdd, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addGap(3, 3, 3).addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(layout.createSequentialGroup().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout .createSequentialGroup().addComponent(jLabel5) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(TextW, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addGap(0, 0, Short.MAX_VALUE) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 212, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(24, 24, 24)) .addGroup(layout.createSequentialGroup() .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 263, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, 34, Short.MAX_VALUE))) .addGroup(layout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 214, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createSequentialGroup() .addGap(127, 127, 127).addComponent(Button_Result, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addComponent(jScrollPane3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 271, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED).addGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(Panel_Chart, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 661, Short.MAX_VALUE)))) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGap(22, 22, 22) .addComponent(Title, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(9, 9, 9) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1).addComponent(jLabel2)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createSequentialGroup() .addComponent(jButtonAdd, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(28, 28, 28).addComponent(jButtonDelete, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGap(9, 9, 9) .addGroup(layout .createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(TextW, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(61, 61, 61)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(Button_Result, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18))) .addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel3).addComponent(jLabel4)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 234, Short.MAX_VALUE) .addComponent(jScrollPane3))) .addComponent(Panel_Chart, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap())); pack(); }
From source file:speedbagalg.OscopeView.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 a2 s . co m */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanelOscope = new javax.swing.JPanel(); jPanel1 = new javax.swing.JPanel(); exitButton = new javax.swing.JButton(); plotXCheckBox = new javax.swing.JCheckBox(); plotYCheckBox = new javax.swing.JCheckBox(); plotZCheckBox = new javax.swing.JCheckBox(); startButton = new javax.swing.JButton(); hStartSpinner = new javax.swing.JSpinner(); jLabel1 = new javax.swing.JLabel(); vMaxSpinner = new javax.swing.JSpinner(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); hitCountTextField = new javax.swing.JTextField(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jPanelOscope.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED)); javax.swing.GroupLayout jPanelOscopeLayout = new javax.swing.GroupLayout(jPanelOscope); jPanelOscope.setLayout(jPanelOscopeLayout); jPanelOscopeLayout.setHorizontalGroup(jPanelOscopeLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE)); jPanelOscopeLayout.setVerticalGroup(jPanelOscopeLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 373, Short.MAX_VALUE)); jPanel1.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED)); exitButton.setText("Exit"); exitButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { exitButtonActionPerformed(evt); } }); plotXCheckBox.setText("Plot X"); plotXCheckBox.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { plotXCheckBoxStateChanged(evt); } }); plotYCheckBox.setText("Plot Y"); plotYCheckBox.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { plotYCheckBoxStateChanged(evt); } }); plotZCheckBox.setText("Plot Z"); plotZCheckBox.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { plotZCheckBoxStateChanged(evt); } }); startButton.setText("Start"); startButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { startButtonActionPerformed(evt); } }); hStartSpinner.setModel( new javax.swing.SpinnerNumberModel(Integer.valueOf(0), null, null, Integer.valueOf(1000))); hStartSpinner.setToolTipText("Start Time"); hStartSpinner.setName(""); // NOI18N hStartSpinner.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { hStartSpinnerStateChanged(evt); } }); jLabel1.setText("H Start"); vMaxSpinner.setModel( new javax.swing.SpinnerNumberModel(Integer.valueOf(500), null, null, Integer.valueOf(10))); vMaxSpinner.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { vMaxSpinnerStateChanged(evt); } }); jLabel2.setText("V Max"); jLabel3.setText("Hit Count:"); hitCountTextField.setText("0"); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addGap(8, 8, 8) .addComponent(startButton).addGap(104, 104, 104).addComponent(jLabel3) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(hitCountTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap() .addComponent(hStartSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel1)) .addGroup(jPanel1Layout.createSequentialGroup().addGap(216, 216, 216) .addComponent(vMaxSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel2))) .addGap(52, 52, 52).addGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(plotYCheckBox).addComponent(plotXCheckBox)) .addContainerGap(158, Short.MAX_VALUE)) .addGroup(jPanel1Layout.createSequentialGroup().addComponent(plotZCheckBox) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(exitButton).addGap(20, 20, 20))))); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(plotXCheckBox) .addComponent(hStartSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel1)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(plotYCheckBox).addGap(2, 2, 2)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup().addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(vMaxSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2)).addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.UNRELATED))) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(startButton).addComponent(plotZCheckBox).addComponent(exitButton) .addComponent(jLabel3).addComponent(hitCountTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, 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( javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanelOscope, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup( javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addContainerGap() .addComponent(jPanelOscope, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(8, 8, 8))); jPanelOscope.getAccessibleContext().setAccessibleName(""); pack(); }
From source file:arduinouno.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./*from w w w . 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(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jTextA0Reading = new javax.swing.JTextField(); jTextA1Reading = new javax.swing.JTextField(); jButtonExit = new javax.swing.JButton(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); jTextA2Reading = new javax.swing.JTextField(); jTextA3Reading = new javax.swing.JTextField(); jSeparator3 = new javax.swing.JSeparator(); jTextA4Reading = new javax.swing.JTextField(); jLabel6 = new javax.swing.JLabel(); jTextA5Reading = new javax.swing.JTextField(); jLabel7 = new javax.swing.JLabel(); jCheckBoxA0 = new javax.swing.JCheckBox(); jCheckBoxA1 = new javax.swing.JCheckBox(); jCheckBoxA2 = new javax.swing.JCheckBox(); jCheckBoxA3 = new javax.swing.JCheckBox(); jCheckBoxA4 = new javax.swing.JCheckBox(); jCheckBoxA5 = new javax.swing.JCheckBox(); jButtonGuardar = new javax.swing.JButton(); jButtonSelectFile = new javax.swing.JButton(); jTextFieldSaveFile = new javax.swing.JTextField(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 804, Short.MAX_VALUE)); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 512, Short.MAX_VALUE)); jLabel1.setText("Grafico"); jLabel2.setText("A0"); jLabel3.setText("A1"); jTextA0Reading.setEditable(false); jTextA0Reading.setHorizontalAlignment(javax.swing.JTextField.CENTER); jTextA0Reading.setText("0"); jTextA1Reading.setEditable(false); jTextA1Reading.setHorizontalAlignment(javax.swing.JTextField.CENTER); jTextA1Reading.setText("0"); jButtonExit.setText("Salir"); jButtonExit.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jButtonExitMouseClicked(evt); } }); jLabel4.setText("A2"); jLabel5.setText("A3"); jTextA2Reading.setEditable(false); jTextA2Reading.setHorizontalAlignment(javax.swing.JTextField.CENTER); jTextA2Reading.setText("0"); jTextA3Reading.setEditable(false); jTextA3Reading.setHorizontalAlignment(javax.swing.JTextField.CENTER); jTextA3Reading.setText("0"); jTextA4Reading.setEditable(false); jTextA4Reading.setHorizontalAlignment(javax.swing.JTextField.CENTER); jTextA4Reading.setText("0"); jLabel6.setText("A5"); jTextA5Reading.setEditable(false); jTextA5Reading.setHorizontalAlignment(javax.swing.JTextField.CENTER); jTextA5Reading.setText("0"); jLabel7.setText("A4"); jCheckBoxA0.setText("jCheckBox1"); jCheckBoxA0.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jCheckBoxA0MouseClicked(evt); } }); jCheckBoxA1.setText("jCheckBox1"); jCheckBoxA2.setText("jCheckBox1"); jCheckBoxA3.setText("jCheckBox1"); jCheckBoxA4.setText("jCheckBox1"); jCheckBoxA5.setText("jCheckBox1"); jButtonGuardar.setText("Guardar"); jButtonGuardar.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jButtonGuardarMouseClicked(evt); } }); jButtonGuardar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonGuardarActionPerformed(evt); } }); jButtonSelectFile.setText("Select File"); jButtonSelectFile.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonSelectFileActionPerformed(evt); } }); jTextFieldSaveFile.setEditable(false); jTextFieldSaveFile.setHorizontalAlignment(javax.swing.JTextField.LEFT); jTextFieldSaveFile.setText("None"); 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().addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup().addGap(378, 378, 378).addComponent(jLabel1))) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(layout.createSequentialGroup().addGap(2, 2, 2) .addGroup(layout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(layout.createSequentialGroup() .addGap(24, 24, 24).addComponent(jLabel4)) .addGroup(layout.createSequentialGroup() .addGap(25, 25, 25).addComponent(jLabel5)) .addComponent(jTextA2Reading, javax.swing.GroupLayout.DEFAULT_SIZE, 70, Short.MAX_VALUE) .addComponent(jTextA3Reading))) .addGroup(layout.createSequentialGroup().addGap(27, 27, 27) .addComponent(jLabel7)) .addGroup(layout.createSequentialGroup().addGap(28, 28, 28) .addComponent(jLabel6)) .addComponent(jTextA5Reading).addComponent(jTextA4Reading)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jCheckBoxA2, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jCheckBoxA3, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jCheckBoxA4, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jCheckBoxA5, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(layout.createSequentialGroup().addGap(14, 14, 14).addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jTextA0Reading, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGap(24, 24, 24) .addComponent(jLabel2)) .addGroup(layout.createSequentialGroup().addGap(25, 25, 25) .addComponent(jLabel3)) .addComponent(jTextA1Reading, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jCheckBoxA0, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jCheckBoxA1, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(0, 23, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(jButtonExit, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jSeparator3, javax.swing.GroupLayout.DEFAULT_SIZE, 111, Short.MAX_VALUE) .addComponent(jButtonGuardar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButtonSelectFile, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jTextFieldSaveFile)) .addContainerGap())))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addComponent(jLabel1).addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(layout.createSequentialGroup().addGap(15, 15, 15).addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jTextA0Reading, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jCheckBoxA0)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel3) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jTextA1Reading, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jCheckBoxA1)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel4) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jTextA2Reading, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jCheckBoxA2)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel5) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jTextA3Reading, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jCheckBoxA3)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel7) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jTextA4Reading, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jCheckBoxA4)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel6) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jTextA5Reading, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jCheckBoxA5)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 12, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jTextFieldSaveFile, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButtonSelectFile) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButtonGuardar) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jButtonExit).addContainerGap()) .addGroup(layout.createSequentialGroup() .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))))); pack(); }
From source file:Main.java
public Main() { setDefaultCloseOperation(EXIT_ON_CLOSE); Container pane = getContentPane(); GroupLayout gl = new GroupLayout(pane); pane.setLayout(gl);//from ww w . j a v a 2 s . co m gl.setAutoCreateGaps(true); gl.setAutoCreateContainerGaps(true); JButton btn = new JButton("Switch"); btn.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { for (int i = 1; i < 9; i++) { labels[i].setVisible(!labels[i].isVisible()); } } }); gl.setHonorsVisibility(false); SequentialGroup seqGroup = gl.createSequentialGroup(); gl.setHorizontalGroup(seqGroup); seqGroup.addComponent(btn); seqGroup.addPreferredGap(ComponentPlacement.UNRELATED, 10, 10); for (int i = 0; i < 10; i++) { seqGroup.addComponent(labels[i]); seqGroup.addPreferredGap(ComponentPlacement.UNRELATED, 10, 10); } ParallelGroup parGroup = gl.createParallelGroup(); gl.setVerticalGroup(parGroup); parGroup.addComponent(btn); for (int i = 0; i < 10; i++) { parGroup.addComponent(labels[i]); } pack(); }
From source file:graph.plotter.BarMenu.java
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jButton2 = new javax.swing.JButton(); buttonGroup1 = new javax.swing.ButtonGroup(); barPanel = new javax.swing.JPanel(); jButton1 = new javax.swing.JButton(); jButton3 = new javax.swing.JButton(); jLabel3 = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); Table = new javax.swing.JTable(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jTextField1 = new javax.swing.JTextField(); jTextField2 = new javax.swing.JTextField(); addButton = new javax.swing.JButton(); deleteButton = new javax.swing.JButton(); jButton6 = new javax.swing.JButton(); jTextField3 = new javax.swing.JTextField(); jRadioButton1 = new javax.swing.JRadioButton(); jRadioButton2 = new javax.swing.JRadioButton(); jLabel4 = new javax.swing.JLabel(); jButton2.setText("jButton2"); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setResizable(false);//from w w w .j av a 2 s .c o m barPanel.setBackground(new java.awt.Color(204, 204, 204)); barPanel.setToolTipText(""); barPanel.setPreferredSize(new java.awt.Dimension(858, 513)); barPanel.setLayout(null); jButton1.setText("Show in Bar Chart"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); barPanel.add(jButton1); jButton1.setBounds(550, 400, 140, 48); jButton3.setText("BACK"); jButton3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton3ActionPerformed(evt); } }); barPanel.add(jButton3); jButton3.setBounds(710, 410, 100, 36); jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/graph/plotter/Untitled.jpg"))); // NOI18N jLabel3.setText("jLabel3"); barPanel.add(jLabel3); jLabel3.setBounds(0, 0, 490, 500); Table.setModel(new javax.swing.table.DefaultTableModel(new Object[][] { }, new String[] { "Name", "Amount" })); Table.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { TableMouseClicked(evt); } }); jScrollPane1.setViewportView(Table); barPanel.add(jScrollPane1); jScrollPane1.setBounds(490, 190, 360, 110); jLabel1.setText(" Name"); barPanel.add(jLabel1); jLabel1.setBounds(520, 40, 130, 20); jLabel2.setText("Amount"); barPanel.add(jLabel2); jLabel2.setBounds(720, 40, 150, 20); barPanel.add(jTextField1); jTextField1.setBounds(510, 70, 150, 30); jTextField2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextField2ActionPerformed(evt); } }); barPanel.add(jTextField2); jTextField2.setBounds(710, 70, 120, 30); addButton.setText("Add"); addButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { addButtonActionPerformed(evt); } }); barPanel.add(addButton); addButton.setBounds(540, 110, 80, 30); deleteButton.setText("Delete"); deleteButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { deleteButtonActionPerformed(evt); } }); barPanel.add(deleteButton); deleteButton.setBounds(540, 150, 80, 30); jButton6.setText("Import"); jButton6.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton6ActionPerformed(evt); } }); barPanel.add(jButton6); jButton6.setBounds(740, 350, 73, 30); barPanel.add(jTextField3); jTextField3.setBounds(540, 350, 190, 30); buttonGroup1.add(jRadioButton1); jRadioButton1.setText("User Input"); jRadioButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jRadioButton1ActionPerformed(evt); } }); barPanel.add(jRadioButton1); jRadioButton1.setBounds(520, 20, 120, 23); buttonGroup1.add(jRadioButton2); jRadioButton2.setText("Attach .csv File"); jRadioButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jRadioButton2ActionPerformed(evt); } }); barPanel.add(jRadioButton2); jRadioButton2.setBounds(520, 320, 170, 23); jLabel4.setText("[Blank Input is not Allowed!]"); barPanel.add(jLabel4); jLabel4.setBounds(640, 110, 170, 30); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addComponent(barPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 967, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent( barPanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 506, Short.MAX_VALUE)); pack(); }
From source file:stockit.ClientFrame.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 va2 s .c o m*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jScrollPane2 = new javax.swing.JScrollPane(); StockInfoTable = new javax.swing.JTable(); PerformanceBtn = new javax.swing.JButton(); SelectedStockLabel = new javax.swing.JLabel(); SelectedStockId = new javax.swing.JLabel(); ChartContainer = new javax.swing.JPanel(); TableTitle = new javax.swing.JLabel(); ViewAccountBtn = new javax.swing.JButton(); jSeparator1 = new javax.swing.JSeparator(); jMenuBar1 = new javax.swing.JMenuBar(); jMenu1 = new javax.swing.JMenu(); Logout = new javax.swing.JMenuItem(); jMenu2 = new javax.swing.JMenu(); jMenuItem1 = new javax.swing.JMenuItem(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("Stock It - "); setPreferredSize(new java.awt.Dimension(1000, 650)); setSize(new java.awt.Dimension(1000, 650)); StockInfoTable.setAutoCreateRowSorter(true); StockInfoTable.setModel(new javax.swing.table.DefaultTableModel(new Object[][] { }, new String[] { "Symbol", "Name", "Sector", "Quantity", "High", "Low", "Last", "Today's Change", "Currency", "Profit/Loss" }) { Class[] types = new Class[] { java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class }; boolean[] canEdit = new boolean[] { false, false, false, false, false, false, false, false, false, false }; public Class getColumnClass(int columnIndex) { return types[columnIndex]; } public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit[columnIndex]; } }); StockInfoTable.setToolTipText("Your Stock Data"); StockInfoTable.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); StockInfoTable.setName("Stocks"); // NOI18N StockInfoTable.setOpaque(false); StockInfoTable.setSelectionBackground(new java.awt.Color(0, 204, 204)); StockInfoTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); StockInfoTable.getTableHeader().setResizingAllowed(false); StockInfoTable.getTableHeader().setReorderingAllowed(false); StockInfoTable.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() { public void mouseDragged(java.awt.event.MouseEvent evt) { StockInfoTableMouseDragged(evt); } }); StockInfoTable.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { StockInfoTableMouseClicked(evt); } }); StockInfoTable.addKeyListener(new java.awt.event.KeyAdapter() { public void keyPressed(java.awt.event.KeyEvent evt) { StockInfoTableKeyPressed(evt); } public void keyReleased(java.awt.event.KeyEvent evt) { StockInfoTableKeyReleased(evt); } }); jScrollPane2.setViewportView(StockInfoTable); StockInfoTable.getColumnModel().getSelectionModel() .setSelectionMode(javax.swing.ListSelectionModel.SINGLE_INTERVAL_SELECTION); PerformanceBtn.setText("Check Performance"); PerformanceBtn.setToolTipText("Select a Stock to view its performance"); PerformanceBtn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { PerformanceBtnActionPerformed(evt); } }); SelectedStockLabel.setText("Selected Stock:"); SelectedStockId.setText("N/A"); javax.swing.GroupLayout ChartContainerLayout = new javax.swing.GroupLayout(ChartContainer); ChartContainer.setLayout(ChartContainerLayout); ChartContainerLayout.setHorizontalGroup(ChartContainerLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 591, Short.MAX_VALUE)); ChartContainerLayout.setVerticalGroup(ChartContainerLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 309, Short.MAX_VALUE)); TableTitle.setFont(new java.awt.Font("Trebuchet MS", 0, 18)); // NOI18N TableTitle.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); TableTitle.setText("Your Stocks"); TableTitle.setFocusable(false); TableTitle.setMaximumSize(new java.awt.Dimension(598, 512)); ViewAccountBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/stockit/setting.png"))); // NOI18N ViewAccountBtn.setToolTipText("view account details"); ViewAccountBtn.setBorder(null); ViewAccountBtn.setBorderPainted(false); ViewAccountBtn.setFocusPainted(false); ViewAccountBtn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ViewAccountBtnActionPerformed(evt); } }); jMenu1.setText("File"); Logout.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_DELETE, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK)); Logout.setText("Logout"); Logout.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { LogoutActionPerformed(evt); } }); jMenu1.add(Logout); jMenuBar1.add(jMenu1); jMenu2.setText("Options"); jMenuItem1.setText("Account"); jMenuItem1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem1ActionPerformed(evt); } }); jMenu2.add(jMenuItem1); jMenuBar1.add(jMenu2); 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().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(ViewAccountBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 959, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGap(454, 454, 454) .addComponent(TableTitle, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup().addContainerGap() .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 967, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addGroup(layout.createSequentialGroup().addContainerGap() .addComponent(PerformanceBtn) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(SelectedStockLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(SelectedStockId)) .addGroup(layout.createSequentialGroup().addGap(163, 163, 163).addComponent( ChartContainer, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addContainerGap(23, Short.MAX_VALUE))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(ViewAccountBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(TableTitle, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(PerformanceBtn).addComponent(SelectedStockLabel) .addComponent(SelectedStockId)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(ChartContainer, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap())); pack(); }