List of usage examples for javax.swing GroupLayout setVerticalGroup
public void setVerticalGroup(Group group)
From source file:wsattacker.plugin.dos.dosExtension.gui.DosResultJFrame.java
/** * This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The * content of this method is always regenerated by the Form Editor. *//*from w w w . j a v a 2 s .co m*/ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" // desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { // This will create the chart ChartObject chartObject = new ChartObject(model); JFreeChart chart = chartObject.createOverlaidChart(); jChartPanel = new ChartPanel(chart); jButtonCloseAll = new javax.swing.JButton(); jButtonExport = new javax.swing.JButton(); jButtonHelp = new javax.swing.JButton(); jPanelSuccess = new javax.swing.JPanel(); jLabelSuccess = new javax.swing.JLabel(); jLabel1 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); jPanelMetadata = new javax.swing.JPanel(); jLabelMetadata = new javax.swing.JLabel(); jPanel1 = new javax.swing.JPanel(); jSpinner1 = new javax.swing.JSpinner(); jLabel3 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE); setTitle("WS-Attacker - DOS Attack Results"); addWindowListener(new java.awt.event.WindowAdapter() { @Override public void windowClosing(java.awt.event.WindowEvent evt) { handlerCloseFinishedAttack(evt); } }); jChartPanel.setBorder(new LineBorder(new java.awt.Color(0, 0, 0), 0, false)); resultGenerator.setJChartPanel((ChartPanel) jChartPanel); // to refresh // just call // this // refernce // in Model! javax.swing.GroupLayout jChartPanelLayout = new javax.swing.GroupLayout(jChartPanel); jChartPanel.setLayout(jChartPanelLayout); jChartPanelLayout.setHorizontalGroup(jChartPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 713, Short.MAX_VALUE)); jChartPanelLayout.setVerticalGroup(jChartPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 653, Short.MAX_VALUE)); jButtonCloseAll.setText("Close"); jButtonCloseAll.setToolTipText("Closes all open attack windows"); jButtonCloseAll.addActionListener(new CloseAttackFinishedController(this)); jButtonExport.setText("Export Results + Request Details"); jButtonExport.setToolTipText("Save attack report"); jButtonExport.addActionListener(new ReportController(resultGenerator)); jButtonHelp.setText("Help Menu"); jButtonHelp.setToolTipText("Open Help menu in web browser"); jButtonHelp.addActionListener(new HelpController(resultGenerator)); jPanelSuccess.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Attack Success Metric", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, java.awt.Color.black)); jLabelSuccess.setFont(new java.awt.Font("Ubuntu", 0, 14)); // NOI18N jLabelSuccess .setText("" + "<html>" + "Attack roundtrip time ratio:<br />" + model.getAttackRoundtripTimeRatio() + " Points - " + model.getAttackRoundtripTimeRatioDescription("text") + "</html>"); jLabel7.setFont(new java.awt.Font("Ubuntu", 0, 14)); // NOI18N jLabel7.setText("" + "<html>" + "Testprobe roundtrip time after attack (" + model.getAttackLongevitySeconds() + " sec)<br />" + model.getTestProbeAttackRoundtripTime() + " sec - " + model.getTestProbeAttackRoundtripTimeDescription("text") + "</html>"); javax.swing.GroupLayout jPanelSuccessLayout = new javax.swing.GroupLayout(jPanelSuccess); jPanelSuccess.setLayout(jPanelSuccessLayout); jPanelSuccessLayout.setHorizontalGroup(jPanelSuccessLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelSuccessLayout.createSequentialGroup().addContainerGap() .addGroup( jPanelSuccessLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanelSuccessLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabelSuccess, javax.swing.GroupLayout.DEFAULT_SIZE, 279, Short.MAX_VALUE) .addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))); jPanelSuccessLayout .setVerticalGroup( jPanelSuccessLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelSuccessLayout.createSequentialGroup() .addGroup(jPanelSuccessLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabelSuccess, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(jPanelSuccessLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); java.net.URL imgURL1 = getClass().getResource(model.getAttackRoundtripTimeRatioDescription("image")); if (imgURL1 != null) { jLabel1.setIcon(new ImageIcon(imgURL1, "Status Attack Metric 1")); } else { System.err.println("Couldn't find file: " + "/IMG/XX.png"); } java.net.URL imgURL4 = getClass().getResource(model.getTestProbeAttackRoundtripTimeDescription("image")); if (imgURL4 != null) { jLabel4.setIcon(new ImageIcon(imgURL4, "Status Attack Metric 4")); } else { System.err.println("Couldn't find file: " + "/IMG/ok.png"); } jPanelMetadata.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Attack Metadata", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, java.awt.Color.black)); jLabelMetadata.setFont(new java.awt.Font("Ubuntu", 0, 14)); // NOI18N jLabelMetadata.setText("" + "<html>" + "<table>" + "<tr>" + "<td>Attack start:</td>" + "<td>" + model.getStartDate() + "</td>" + "</tr>" + "<tr>" + "<td>Attack stop:</td>" + "<td>" + model.getStopDate() + "</td>" + "</tr>" + "<tr>" + "<td>Parallel threads:</td>" + "<td>" + model.getNumberThreads() + "</td>" + "</tr>" + "<tr>" + "<td>Requests per thread:</td>" + "<td>" + model.getNumberRequestsPerThread() + "</td>" + "</tr>" + "<tr>" + "<td>Request repeat interval</td>" + "<td>" + (model.getSecondsBetweenRequests()) + " ms</td>" + "</tr>" + "<tr>" + "<td>Server recovery time</td>" + "<td>" + (model.getSecondsServerLoadRecovery() / 1000) + " sec</td>" + "</tr>" + "<tr>" + "<td>Send testprobes:</td>" + "<td>" + model.getCounterProbesSend() + "</td>" + "</tr>" + "<tr>" + "<td>Testprobe repeat interval</td>" + "<td>" + (model.getSecondsBetweenProbes()) + " ms</td>" + "</tr>" + "<tr>" + "<td>Size testprobe request:</td>" + "<td>" + model.getRequestSizeTestProbe() + " Bytes</td>" + "</tr>" + "<tr>" + "<td>Size untampered padded request:</td>" + "<td>" + model.getRequestSizePaddedUntampered() + " Bytes</td>" + "</tr>" + "<tr>" + "<td>Size tampered padded request:</td>" + "<td>" + model.getRequestSizePaddedTampered() + " Bytes</td>" + "</tr>" + "</table>" + "</html>"); javax.swing.GroupLayout jPanelMetadataLayout = new javax.swing.GroupLayout(jPanelMetadata); jPanelMetadata.setLayout(jPanelMetadataLayout); jPanelMetadataLayout .setHorizontalGroup( jPanelMetadataLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelMetadataLayout.createSequentialGroup().addContainerGap() .addComponent(jLabelMetadata, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap())); jPanelMetadataLayout .setVerticalGroup( jPanelMetadataLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelMetadataLayout.createSequentialGroup().addContainerGap() .addComponent(jLabelMetadata, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap())); jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Diagramm Settings", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, java.awt.Color.black)); jSpinner1.setFont(new java.awt.Font("Ubuntu", 0, 14)); // NOI18N jSpinner1.setModel(new javax.swing.SpinnerNumberModel(1, 1, 60, 1)); jSpinner1.addChangeListener(new javax.swing.event.ChangeListener() { @Override public void stateChanged(javax.swing.event.ChangeEvent evt) { jSpinner1StateChanged(evt); } }); jLabel3.setFont(new java.awt.Font("Ubuntu", 0, 14)); // NOI18N jLabel3.setText("Interval length (default 1 sec)"); 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() .addComponent(jSpinner1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel3) .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(24, Short.MAX_VALUE) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jSpinner1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel3)) .addContainerGap())); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGap(18, 18, 18) .addComponent(jChartPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jPanelSuccess, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButtonExport, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButtonCloseAll, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButtonHelp, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanelMetadata, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); 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.TRAILING) .addComponent(jChartPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup() .addComponent(jPanelMetadata, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(jPanelSuccess, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(jPanel1, 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(jButtonHelp).addGap(18, 18, 18).addComponent(jButtonExport) .addGap(18, 18, 18).addComponent(jButtonCloseAll))) .addContainerGap())); java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize(); setBounds((screenSize.width - 1110) / 2, (screenSize.height - 707) / 2, 1110, 707); }
From source file:graphic.ihm.dialog.createperso.DialCreatePerso.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 . j av a 2 s. c om*/ */ public void initComponents() { MessageResolver msgRes = new MessageResolver(); group = new javax.swing.ButtonGroup(); jPanel1 = new javax.swing.JPanel(); jPanel5 = new javax.swing.JPanel(); caracteristiques = new javax.swing.JLabel(); caracteristiques2 = new javax.swing.JLabel(); caracteristiques.setHorizontalAlignment(JLabel.CENTER); caracteristiques2.setHorizontalAlignment(JLabel.CENTER); jPanel6 = new javax.swing.JPanel(); jPanel7 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); txtFieldNom = new javax.swing.JTextField(); jPanel8 = new javax.swing.JPanel(); jLabel2 = new javax.swing.JLabel(); comboRace = new javax.swing.JComboBox(); jPanel9 = new javax.swing.JPanel(); jLabel3 = new javax.swing.JLabel(); homme = new javax.swing.JRadioButton(); femme = new javax.swing.JRadioButton(); jPanel2 = new javax.swing.JPanel(); jPanel3 = new javax.swing.JPanel(); jButton1 = new javax.swing.JButton(); jPanel4 = new javax.swing.JPanel(); jButton2 = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); jPanel1.setLayout(new java.awt.BorderLayout()); jPanel5.setLayout(new java.awt.GridLayout(1, 2)); jPanel5.add(caracteristiques); jPanel5.add(caracteristiques2); jPanel1.add(jPanel5, java.awt.BorderLayout.CENTER); jPanel6.setLayout(new java.awt.GridLayout(3, 2)); jPanel6.add(new JPanel()); jPanel6.add(new JPanel()); jPanel7.setLayout(new java.awt.GridLayout(1, 2)); jLabel1.setText(" " + msgRes.getValueFromCode("dial.create.nom")); jPanel7.add(jLabel1); jPanel7.add(txtFieldNom); jPanel6.add(jPanel7); jPanel8.setLayout(new java.awt.GridLayout(1, 2)); jLabel2.setText(" " + msgRes.getValueFromCode("dial.create.race")); jPanel8.add(jLabel2); RaceProvider provider = new RaceProvider(); String[] races = provider.getRaces(); comboRace.setModel(new javax.swing.DefaultComboBoxModel(races)); comboRace.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { PersonneBO bo = new PersonneBO(); Map<String, Integer> chargeCaracteristicsPerso = bo.chargeCaracteristicsPerso(getRace()); setInfoCaracteristiques(chargeCaracteristicsPerso); } }); jPanel8.add(comboRace); jPanel6.add(jPanel8); jPanel9.setLayout(new java.awt.GridLayout(1, 2)); jLabel3.setText(" " + msgRes.getValueFromCode("dial.create.sexe")); jPanel9.add(jLabel3); homme.setText(msgRes.getValueFromCode("dial.create.sexe.homme")); group.add(homme); jPanel9.add(homme); femme.setText(msgRes.getValueFromCode("dial.create.sexe.femme")); group.add(femme); jPanel9.add(femme); jPanel6.add(jPanel9); jPanel1.add(jPanel6, java.awt.BorderLayout.NORTH); getContentPane().add(jPanel1, java.awt.BorderLayout.CENTER); jPanel2.setLayout(new java.awt.GridLayout(1, 2)); jButton1.setText(msgRes.getValueFromCode("dial.create.btn.create")); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { createActionPerformed(evt); } }); javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout .setHorizontalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup().addGap(100, 100, 100).addComponent(jButton1) .addContainerGap(113, Short.MAX_VALUE))); jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup().addGap(15, 15, 15).addComponent(jButton1) .addContainerGap(41, Short.MAX_VALUE))); jPanel2.add(jPanel3); jButton2.setText(msgRes.getValueFromCode("dial.create.btn.cancel")); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cancelActionPerformed(evt); } }); javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4); jPanel4.setLayout(jPanel4Layout); jPanel4Layout.setHorizontalGroup(jPanel4Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup() .addContainerGap(110, Short.MAX_VALUE).addComponent(jButton2).addGap(100, 100, 100))); jPanel4Layout.setVerticalGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel4Layout.createSequentialGroup().addGap(15, 15, 15).addComponent(jButton2) .addContainerGap(43, Short.MAX_VALUE))); jPanel2.add(jPanel4); jPanel2.setPreferredSize(new Dimension(400, 50)); getContentPane().add(jPanel2, java.awt.BorderLayout.SOUTH); pack(); }
From source file:io.bibleget.BibleGetHelp.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 av a2 s . c om*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jSplitPane1 = new javax.swing.JSplitPane(); jScrollPane2 = new javax.swing.JScrollPane(); jTree1 = new javax.swing.JTree(); jScrollPane3 = new javax.swing.JScrollPane(); jTextPane2 = new javax.swing.JTextPane(); jTextPane2.putClientProperty(JTextPane.HONOR_DISPLAY_PROPERTIES, true); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle(__("Instructions")); setBounds(frameLeft, frameTop, frameWidth, frameHeight); setIconImages(setIconImages()); renderer = new LocalCellRenderer(jTree1); javax.swing.tree.DefaultMutableTreeNode treeNode1 = new javax.swing.tree.DefaultMutableTreeNode(__("Help")); javax.swing.tree.DefaultMutableTreeNode treeNode2 = new javax.swing.tree.DefaultMutableTreeNode( __("Usage of the Plugin")); javax.swing.tree.DefaultMutableTreeNode treeNode3; treeNode1.add(treeNode2); treeNode2 = new javax.swing.tree.DefaultMutableTreeNode(__("Formulation of the Queries")); treeNode1.add(treeNode2); treeNode2 = new javax.swing.tree.DefaultMutableTreeNode(__("Biblical Books and Abbreviations")); treeNode1.add(treeNode2); for (JsonValue jsonValue : bibleVersionsObj) { treeNode3 = new javax.swing.tree.DefaultMutableTreeNode( BibleGetI18N.localizeLanguage(jsonValue.toString())); treeNode2.add(treeNode3); } jTree1.setModel(new javax.swing.tree.DefaultTreeModel(treeNode1)); jTree1.setCellRenderer(renderer); jTree1.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jTree1MouseClicked(evt); } }); jScrollPane2.setViewportView(jTree1); jSplitPane1.setLeftComponent(jScrollPane2); jTextPane2.setContentType("text/html;charset=UTF-8"); // NOI18N jTextPane2.setDocument(doc); jTextPane2.setEditorKit(kit); jTextPane2.setText(HTMLStr0); jScrollPane3.setViewportView(jTextPane2); jSplitPane1.setRightComponent(jScrollPane3); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jSplitPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 1250, Short.MAX_VALUE)); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jSplitPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 600, Short.MAX_VALUE)); pack(); }
From source file:se.backede.jeconomix.forms.report.SingleTransactionReport.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 av a 2 s.c om */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jScrollPane1 = new javax.swing.JScrollPane(); transactionTable = new javax.swing.JTable(); lineChartPanel = new javax.swing.JPanel(); sumLabel = new javax.swing.JLabel(); transactionSumLabel = new javax.swing.JLabel(); monthComboBox = new javax.swing.JComboBox<>(); jLabel1 = new javax.swing.JLabel(); companyComboBox = new javax.swing.JComboBox<>(); jLabel2 = new javax.swing.JLabel(); yearComboBox = new javax.swing.JComboBox<>(); jLabel3 = new javax.swing.JLabel(); categoryNameLabel = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); transactionTable .setModel(new javax.swing.table.DefaultTableModel( new Object[][] { { null, null, null, null }, { null, null, null, null }, { null, null, null, null }, { null, null, null, null } }, new String[] { "Title 1", "Title 2", "Title 3", "Title 4" })); jScrollPane1.setViewportView(transactionTable); lineChartPanel.setBackground(new java.awt.Color(255, 255, 255)); javax.swing.GroupLayout lineChartPanelLayout = new javax.swing.GroupLayout(lineChartPanel); lineChartPanel.setLayout(lineChartPanelLayout); lineChartPanelLayout.setHorizontalGroup(lineChartPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE)); lineChartPanelLayout.setVerticalGroup(lineChartPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 153, Short.MAX_VALUE)); sumLabel.setFont(new java.awt.Font("Dialog", 1, 18)); // NOI18N sumLabel.setText("Sum:"); transactionSumLabel.setFont(new java.awt.Font("Dialog", 1, 18)); // NOI18N transactionSumLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); transactionSumLabel.setText("jLabel1"); monthComboBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { monthComboBoxActionPerformed(evt); } }); jLabel1.setText("Select Month"); companyComboBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { companyComboBoxActionPerformed(evt); } }); jLabel2.setText("Select Company"); yearComboBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { yearComboBoxActionPerformed(evt); } }); jLabel3.setText("Select year"); categoryNameLabel.setFont(new java.awt.Font("Dialog", 1, 18)); // NOI18N categoryNameLabel.setText("jLabel4"); jLabel4.setFont(new java.awt.Font("Dialog", 1, 18)); // NOI18N jLabel4.setText("Filter"); 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().addGap(16, 16, 16).addComponent(categoryNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(layout.createSequentialGroup().addGap(0, 0, Short.MAX_VALUE) .addComponent(sumLabel) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(transactionSumLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 656, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(monthComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel1) .addComponent(companyComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel2).addComponent(yearComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 193, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jLabel3).addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(8, 8, 8))) .addContainerGap()) .addComponent(lineChartPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGap(16, 16, 16).addComponent(categoryNameLabel) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(layout.createSequentialGroup().addGap(46, 46, 46).addComponent(jLabel4) .addGap(18, 18, 18).addComponent(jLabel3) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(yearComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(monthComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel2).addGap(9, 9, 9) .addComponent(companyComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(sumLabel).addComponent(transactionSumLabel)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lineChartPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap())); pack(); }
From source file:UserInterface.FinanceRole.OverallTransactionJPanel.java
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor./*from w w w .ja va 2 s. co m*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jScrollPane1 = new javax.swing.JScrollPane(); transactionJTable = new javax.swing.JTable(); titleJLabel = new javax.swing.JLabel(); backJButton4 = new javax.swing.JButton(); vAmtAvJLabel = new javax.swing.JLabel(); virBalJTextField = new javax.swing.JTextField(); vAmtSpJLabel = new javax.swing.JLabel(); virSpentJTextField1 = new javax.swing.JTextField(); rAmtAvJLabel = new javax.swing.JLabel(); realBalJTextField = new javax.swing.JTextField(); rAmtSpJLabel = new javax.swing.JLabel(); realSpentJTextField = new javax.swing.JTextField(); overviewJPanel = new javax.swing.JPanel(); setBackground(new java.awt.Color(255, 255, 255)); transactionJTable.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N transactionJTable.setModel(new javax.swing.table.DefaultTableModel(new Object[][] { }, new String[] { "Transaction ID", "Source", "Source User Account", "Destination User Account", "Destination", "Type", "Mode", "Amount", "Date" }) { boolean[] canEdit = new boolean[] { false, false, false, false, false, false, false, false, false }; public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit[columnIndex]; } }); jScrollPane1.setViewportView(transactionJTable); if (transactionJTable.getColumnModel().getColumnCount() > 0) { transactionJTable.getColumnModel().getColumn(0).setResizable(false); transactionJTable.getColumnModel().getColumn(1).setResizable(false); transactionJTable.getColumnModel().getColumn(2).setResizable(false); transactionJTable.getColumnModel().getColumn(3).setResizable(false); transactionJTable.getColumnModel().getColumn(4).setResizable(false); transactionJTable.getColumnModel().getColumn(5).setResizable(false); transactionJTable.getColumnModel().getColumn(6).setResizable(false); transactionJTable.getColumnModel().getColumn(7).setResizable(false); transactionJTable.getColumnModel().getColumn(8).setResizable(false); } titleJLabel.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N titleJLabel.setText("Transaction History"); backJButton4.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N backJButton4.setText("<< Back"); backJButton4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { backJButton4ActionPerformed(evt); } }); vAmtAvJLabel.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N vAmtAvJLabel.setText("Virtual Amount Available:"); virBalJTextField.setEditable(false); virBalJTextField.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N vAmtSpJLabel.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N vAmtSpJLabel.setText("Virtual Amount Spent:"); virSpentJTextField1.setEditable(false); virSpentJTextField1.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N rAmtAvJLabel.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N rAmtAvJLabel.setText("Real Amount Available:"); realBalJTextField.setEditable(false); realBalJTextField.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N rAmtSpJLabel.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N rAmtSpJLabel.setText("Real Amount Spent:"); realSpentJTextField.setEditable(false); realSpentJTextField.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N javax.swing.GroupLayout overviewJPanelLayout = new javax.swing.GroupLayout(overviewJPanel); overviewJPanel.setLayout(overviewJPanelLayout); overviewJPanelLayout.setHorizontalGroup(overviewJPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 1061, Short.MAX_VALUE)); overviewJPanelLayout.setVerticalGroup(overviewJPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 247, Short.MAX_VALUE)); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGap(40, 40, 40).addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(vAmtAvJLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 250, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(vAmtSpJLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 250, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(layout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent(virSpentJTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 141, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(virBalJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 141, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout .createSequentialGroup() .addComponent(rAmtAvJLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 250, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(34, 34, 34).addComponent(realBalJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 141, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout .createSequentialGroup() .addComponent(rAmtSpJLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 250, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(realSpentJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 141, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addComponent(overviewJPanel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(backJButton4))) .addGroup(layout.createSequentialGroup().addGap(474, 474, 474).addComponent(titleJLabel))) .addGap(57, 57, 57))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap().addComponent(titleJLabel) .addGap(38, 38, 38) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 263, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(vAmtAvJLabel) .addGroup(layout.createSequentialGroup().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(virBalJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(rAmtAvJLabel).addComponent(realBalJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(virSpentJTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(vAmtSpJLabel) .addComponent(realSpentJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(rAmtSpJLabel)))) .addGap(18, 18, 18) .addComponent(overviewJPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(49, 49, 49).addComponent(backJButton4).addGap(37, 37, 37))); }
From source file:api3.window.sound.panel.SoundPanel.java
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor.// ww w .j a v a2 s. c om */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { soundPanel = new javax.swing.JPanel(); jScrollPane = new javax.swing.JScrollPane(); soundLog = new javax.swing.JTextArea(); soundPanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); soundPanel.setLayout(new java.awt.BorderLayout()); soundLog.setColumns(20); soundLog.setRows(5); jScrollPane.setViewportView(soundLog); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addComponent(soundPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 500, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 200, 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.TRAILING) .addComponent(jScrollPane).addComponent(soundPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 228, Short.MAX_VALUE)) .addContainerGap())); }
From source file:com.unicornlabs.kabouter.gui.power.PowerPanel.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 . jav a 2 s.co m */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel1 = new javax.swing.JLabel(); chartPanel = new ChartPanel(myChart); startDateChooser = new com.toedter.calendar.JDateChooser(new Date()); jLabel2 = new javax.swing.JLabel(); Calendar cal = Calendar.getInstance(); cal.add(Calendar.HOUR, -6); startTimeSpinner = new com.unicornlabs.kabouter.gui.components.JTimeSpinner(cal.getTime()); endDateChooser = new com.toedter.calendar.JDateChooser(new Date()); endTimeSpinner = new com.unicornlabs.kabouter.gui.components.JTimeSpinner(); jLabel3 = new javax.swing.JLabel(); applyButton = new javax.swing.JButton(); liveCheckBox = new javax.swing.JCheckBox(); jScrollPane1 = new javax.swing.JScrollPane(); deviceList = new javax.swing.JList(); generateReportButton = new javax.swing.JButton(); jLabel1.setText("Device IDs:"); chartPanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); javax.swing.GroupLayout chartPanelLayout = new javax.swing.GroupLayout(chartPanel); chartPanel.setLayout(chartPanelLayout); chartPanelLayout.setHorizontalGroup(chartPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE)); chartPanelLayout.setVerticalGroup(chartPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 423, Short.MAX_VALUE)); jLabel2.setText("Graph Start Date:"); jLabel3.setText("Graph End Date:"); applyButton.setText("Apply"); applyButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { applyButtonActionPerformed(evt); } }); liveCheckBox.setText("Live"); liveCheckBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { liveCheckBoxActionPerformed(evt); } }); deviceList.setModel(new javax.swing.AbstractListModel() { String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" }; public int getSize() { return strings.length; } public Object getElementAt(int i) { return strings[i]; } }); jScrollPane1.setViewportView(deviceList); generateReportButton.setText("Generate Report"); generateReportButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { generateReportButtonActionPerformed(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(chartPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel2) .addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(startTimeSpinner, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(startDateChooser, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 145, Short.MAX_VALUE)) .addComponent(liveCheckBox)).addGap(73, 73, 73).addComponent(jLabel1) .addGap(10, 10, 10) .addComponent( jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 355, Short.MAX_VALUE) .addGap(69, 69, 69) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(layout.createSequentialGroup().addComponent(generateReportButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(applyButton)) .addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel3) .addGroup(layout .createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(endTimeSpinner, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(endDateChooser, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE)))))) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addComponent(chartPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGap(12, 12, 12).addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(startTimeSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(startDateChooser, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(liveCheckBox).addGap(39, 39, 39) .addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(applyButton).addComponent(generateReportButton))) .addGroup(layout.createSequentialGroup().addGap(18, 18, 18).addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel1) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createSequentialGroup().addComponent(jLabel3) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(endTimeSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(endDateChooser, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))) .addContainerGap())); }
From source file:graph.plotter.PieMenu.java
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { buttonGroup1 = new javax.swing.ButtonGroup(); jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jRadioButton1 = new javax.swing.JRadioButton(); jTextField2 = new javax.swing.JTextField(); jTextField1 = new javax.swing.JTextField(); jScrollPane1 = new javax.swing.JScrollPane(); Table = new javax.swing.JTable(); jRadioButton2 = new javax.swing.JRadioButton(); jTextField3 = new javax.swing.JTextField(); jButton3 = new javax.swing.JButton(); jButton4 = new javax.swing.JButton(); jButton5 = new javax.swing.JButton(); jLabel4 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setResizable(false);//w w w .ja va 2 s . c o m setSize(new java.awt.Dimension(800, 650)); jPanel1.setBackground(new java.awt.Color(255, 255, 255)); jPanel1.setPreferredSize(new java.awt.Dimension(800, 650)); jPanel1.setLayout(null); jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/graph/plotter/4.jpg"))); // NOI18N jPanel1.add(jLabel1); jLabel1.setBounds(0, 0, 470, 470); jLabel2.setText("Name"); jPanel1.add(jLabel2); jLabel2.setBounds(510, 40, 60, 20); jLabel3.setText("Amount"); jPanel1.add(jLabel3); jLabel3.setBounds(700, 40, 60, 20); jButton1.setText("Show in Pie Chart"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jPanel1.add(jButton1); jButton1.setBounds(540, 420, 150, 60); jButton2.setText("Back"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); jPanel1.add(jButton2); jButton2.setBounds(730, 430, 80, 40); buttonGroup1.add(jRadioButton1); jRadioButton1.setText("User Input"); jRadioButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jRadioButton1ActionPerformed(evt); } }); jPanel1.add(jRadioButton1); jRadioButton1.setBounds(480, 10, 110, 23); jTextField2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextField2ActionPerformed(evt); } }); jPanel1.add(jTextField2); jTextField2.setBounds(690, 70, 120, 30); jPanel1.add(jTextField1); jTextField1.setBounds(500, 70, 160, 30); 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); jPanel1.add(jScrollPane1); jScrollPane1.setBounds(500, 200, 310, 110); 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); } }); jPanel1.add(jRadioButton2); jRadioButton2.setBounds(480, 320, 170, 23); jTextField3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextField3ActionPerformed(evt); } }); jPanel1.add(jTextField3); jTextField3.setBounds(520, 350, 190, 40); jButton3.setText("Import"); jButton3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton3ActionPerformed(evt); } }); jPanel1.add(jButton3); jButton3.setBounds(740, 350, 70, 30); jButton4.setText("Add"); jButton4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton4ActionPerformed(evt); } }); jPanel1.add(jButton4); jButton4.setBounds(510, 110, 80, 30); jButton5.setText("Delete"); jButton5.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton5ActionPerformed(evt); } }); jPanel1.add(jButton5); jButton5.setBounds(510, 150, 80, 30); jLabel4.setText("[Blank Input is not Allowed!]"); jPanel1.add(jLabel4); jLabel4.setBounds(620, 120, 170, 20); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 838, javax.swing.GroupLayout.PREFERRED_SIZE)); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 530, Short.MAX_VALUE)); pack(); }
From source file:br.com.utfpr.pb.view.RelatorioCaixaView.java
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor./*from ww w. j a v a 2 s. c o m*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); jButtonFechar = new javax.swing.JButton(); jButtonGerar = new javax.swing.JButton(); jPanel3 = new javax.swing.JPanel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); dataIni = new org.jdesktop.swingx.JXDatePicker(); dataFim = new org.jdesktop.swingx.JXDatePicker(); setClosable(true); setIconifiable(true); setMaximizable(true); setTitle("Relatrio de Caixa"); jButtonFechar.setText("Fechar"); jButtonFechar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonFecharActionPerformed(evt); } }); jButtonGerar.setText("Gerar"); jButtonGerar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonGerarActionPerformed(evt); } }); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addContainerGap().addComponent(jButtonGerar) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 375, Short.MAX_VALUE) .addComponent(jButtonFechar).addContainerGap())); 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) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButtonFechar).addComponent(jButtonGerar)) .addContainerGap())); jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Filtros")); jLabel2.setText("Data inicial *"); jLabel3.setText("Data final *"); javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup(jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup().addContainerGap() .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel3).addComponent(jLabel2)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(dataIni, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(dataFim, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(277, Short.MAX_VALUE))); jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2).addComponent(dataIni, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel3).addComponent(dataFim, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup().addContainerGap().addComponent(jPanel3, 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(jPanel3, 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(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))); pack(); }
From source file:WeatherFrame.java
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor./* ww w . j a v a2 s. c o m*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { ChartPanel = new javax.swing.JPanel(); OptionPanel = new javax.swing.JPanel(); ChooserLabel = new javax.swing.JLabel(); jComboBox1 = new javax.swing.JComboBox<>(); ChooseIntervelLabel = new javax.swing.JLabel(); DailyRadioButton = new javax.swing.JRadioButton(); WeeklyRadioButton = new javax.swing.JRadioButton(); MonthlyRadioButton = new javax.swing.JRadioButton(); YearlyRadioButton = new javax.swing.JRadioButton(); AllRadioButton = new javax.swing.JRadioButton(); PreviousButton = new javax.swing.JButton(); NextButton = new javax.swing.JButton(); SnapCheckBox = new javax.swing.JCheckBox(); InstrumentPanel = new javax.swing.JPanel(); TempThermoPanel = new javax.swing.JPanel(); WeatherMenuBar = new javax.swing.JMenuBar(); FileMenu = new javax.swing.JMenu(); OpenMenuItem = new javax.swing.JMenuItem(); QuitMenuItem = new javax.swing.JMenuItem(); StatMenu = new javax.swing.JMenu(); MeanTempMenuItem = new javax.swing.JMenuItem(); HighTempMenuItem = new javax.swing.JMenuItem(); LowTempMenuItem = new javax.swing.JMenuItem(); MeanWindMenuItem = new javax.swing.JMenuItem(); MaxWindMenuItem = new javax.swing.JMenuItem(); PrevWindMenuItem = new javax.swing.JMenuItem(); RainfallMenuItem = new javax.swing.JMenuItem(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("Weather Data Grapher"); ChartPanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); javax.swing.GroupLayout ChartPanelLayout = new javax.swing.GroupLayout(ChartPanel); ChartPanel.setLayout(ChartPanelLayout); ChartPanelLayout.setHorizontalGroup(ChartPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 700, Short.MAX_VALUE)); ChartPanelLayout.setVerticalGroup(ChartPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 323, Short.MAX_VALUE)); OptionPanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); ChooserLabel.setText("Pick The Data to Graph"); jComboBox1.setModel( new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); ChooseIntervelLabel.setText("Pick a Data interval"); DailyRadioButton.setText("Daily"); DailyRadioButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { DailyRadioButtonActionPerformed(evt); } }); WeeklyRadioButton.setText("Weekly"); MonthlyRadioButton.setText("Monthly"); YearlyRadioButton.setText("Yearly"); AllRadioButton.setText("All"); PreviousButton.setText("Previous Data Set"); NextButton.setText("Next Data Set"); NextButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { NextButtonActionPerformed(evt); } }); SnapCheckBox.setText("Snap to begining of data interval"); javax.swing.GroupLayout OptionPanelLayout = new javax.swing.GroupLayout(OptionPanel); OptionPanel.setLayout(OptionPanelLayout); OptionPanelLayout.setHorizontalGroup(OptionPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(OptionPanelLayout.createSequentialGroup().addGroup(OptionPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(OptionPanelLayout.createSequentialGroup().addContainerGap() .addGroup(OptionPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(OptionPanelLayout.createSequentialGroup().addGap(10, 10, 10) .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(ChooserLabel).addComponent(ChooseIntervelLabel) .addGroup(OptionPanelLayout.createSequentialGroup() .addComponent(DailyRadioButton) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(WeeklyRadioButton) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(MonthlyRadioButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(YearlyRadioButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(AllRadioButton)) .addComponent(SnapCheckBox, javax.swing.GroupLayout.PREFERRED_SIZE, 238, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(OptionPanelLayout.createSequentialGroup().addGap(23, 23, 23) .addComponent(PreviousButton, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18).addComponent(NextButton, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(19, Short.MAX_VALUE))); OptionPanelLayout.setVerticalGroup(OptionPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(OptionPanelLayout.createSequentialGroup().addContainerGap() .addComponent(ChooserLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(ChooseIntervelLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(OptionPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(DailyRadioButton).addComponent(WeeklyRadioButton) .addComponent(MonthlyRadioButton).addComponent(YearlyRadioButton) .addComponent(AllRadioButton)) .addGap(18, 18, 18).addComponent(SnapCheckBox) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(OptionPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(PreviousButton).addComponent(NextButton)) .addGap(33, 33, 33))); InstrumentPanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); javax.swing.GroupLayout TempThermoPanelLayout = new javax.swing.GroupLayout(TempThermoPanel); TempThermoPanel.setLayout(TempThermoPanelLayout); TempThermoPanelLayout.setHorizontalGroup(TempThermoPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 235, Short.MAX_VALUE)); TempThermoPanelLayout.setVerticalGroup(TempThermoPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 355, Short.MAX_VALUE)); javax.swing.GroupLayout InstrumentPanelLayout = new javax.swing.GroupLayout(InstrumentPanel); InstrumentPanel.setLayout(InstrumentPanelLayout); InstrumentPanelLayout.setHorizontalGroup(InstrumentPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(InstrumentPanelLayout.createSequentialGroup().addContainerGap() .addComponent(TempThermoPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); InstrumentPanelLayout .setVerticalGroup( InstrumentPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(InstrumentPanelLayout.createSequentialGroup().addContainerGap() .addComponent(TempThermoPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap())); FileMenu.setText("File"); FileMenu.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { FileMenuActionPerformed(evt); } }); OpenMenuItem.setText("Open"); OpenMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { OpenMenuItemActionPerformed(evt); } }); FileMenu.add(OpenMenuItem); QuitMenuItem.setText("Quit"); FileMenu.add(QuitMenuItem); WeatherMenuBar.add(FileMenu); StatMenu.setText("Statistics"); MeanTempMenuItem.setText("Mean Temperature"); StatMenu.add(MeanTempMenuItem); HighTempMenuItem.setText("High Temperature"); StatMenu.add(HighTempMenuItem); LowTempMenuItem.setText("Low Temperature"); StatMenu.add(LowTempMenuItem); MeanWindMenuItem.setText("Mean Wind Speed"); StatMenu.add(MeanWindMenuItem); MaxWindMenuItem.setText("Max Wind Speed"); StatMenu.add(MaxWindMenuItem); PrevWindMenuItem.setText("Prevailing Wind Direction"); StatMenu.add(PrevWindMenuItem); RainfallMenuItem.setText("Rainfall"); StatMenu.add(RainfallMenuItem); WeatherMenuBar.add(StatMenu); setJMenuBar(WeatherMenuBar); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGap(22, 22, 22) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(InstrumentPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup() .addComponent(ChartPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(OptionPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGap(20, 20, 20) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(OptionPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(ChartPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(InstrumentPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap())); pack(); }