List of usage examples for javax.swing GroupLayout setHorizontalGroup
public void setHorizontalGroup(Group group)
From source file:view.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 w w w. j av a2 s .c om */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { mainPanel = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); textArea = new javax.swing.JTextArea(); graphPanel = new javax.swing.JPanel(); menuBar = new javax.swing.JMenuBar(); jMenu1 = new javax.swing.JMenu(); menuItemOpen = new javax.swing.JMenuItem(); menuItemQuit = new javax.swing.JMenuItem(); menuTransform = new javax.swing.JMenu(); menuItemDCT = new javax.swing.JMenuItem(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); textArea.setEditable(false); textArea.setColumns(20); textArea.setRows(5); jScrollPane1.setViewportView(textArea); javax.swing.GroupLayout graphPanelLayout = new javax.swing.GroupLayout(graphPanel); graphPanel.setLayout(graphPanelLayout); graphPanelLayout.setHorizontalGroup(graphPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE)); graphPanelLayout.setVerticalGroup(graphPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 201, Short.MAX_VALUE)); javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel); mainPanel.setLayout(mainPanelLayout); mainPanelLayout.setHorizontalGroup(mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, mainPanelLayout.createSequentialGroup() .addContainerGap() .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(graphPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 376, Short.MAX_VALUE)) .addContainerGap())); mainPanelLayout .setVerticalGroup( mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(mainPanelLayout.createSequentialGroup().addContainerGap() .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(graphPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap())); jMenu1.setText("File"); menuItemOpen.setText("Open"); menuItemOpen.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { menuItemOpenActionPerformed(evt); } }); jMenu1.add(menuItemOpen); menuItemQuit.setText("Quit"); menuItemQuit.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { menuItemQuitMouseClicked(evt); } }); menuItemQuit.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { menuItemQuitActionPerformed(evt); } }); jMenu1.add(menuItemQuit); menuBar.add(jMenu1); menuTransform.setText("Transform"); menuItemDCT.setText("DCT"); menuItemDCT.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { menuItemDCTActionPerformed(evt); } }); menuTransform.add(menuItemDCT); menuBar.add(menuTransform); setJMenuBar(menuBar); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(mainPanel, 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() .addComponent(mainPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE))); pack(); }
From source file:coextractingopinion.FinalResult.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 a2s . co 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(); jScrollPane1 = new javax.swing.JScrollPane(); jTable1 = new javax.swing.JTable(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jTextField1 = new javax.swing.JTextField(); jTextField2 = new javax.swing.JTextField(); jButton1 = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jLabel1.setFont(new java.awt.Font("Algerian", 0, 24)); // NOI18N jLabel1.setText("Opinion Targets & Opinion Words"); jTable1.setModel(new javax.swing.table.DefaultTableModel(new Object[][] { }, new String[] { "Opinion Target", "Opinion Target Confidence", "Opinion Words", "Opinion Word Confidence" })); jScrollPane1.setViewportView(jTable1); jLabel2.setText("Target Threshold"); jLabel3.setText("Word Threshold"); jButton1.setText("View Graph"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(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().addGap(99, 99, 99).addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel3).addGap(127, 127, 127)) .addGroup(jPanel1Layout.createSequentialGroup().addGap(146, 146, 146).addComponent(jLabel1) .addContainerGap(174, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 580, Short.MAX_VALUE) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(67, 67, 67))); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addGap(33, 33, 33).addComponent(jLabel1) .addGap(18, 18, 18) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2).addComponent(jLabel3)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(27, 27, 27) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18).addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(27, Short.MAX_VALUE))); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, 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() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE))); pack(); }
From source file:org.cytoscape.dyn.internal.graphMetrics.GraphMetricsPanel.java
public GraphMetricsPanel(org.cytoscape.dyn.internal.CyActivator<T, C> cyActivator, DynNetwork<T> dynamicNetwork) { this.cyactivator = cyActivator; this.dynamicNetwork = dynamicNetwork; attributesTable = new JTable(new MyTableModel(dynamicNetwork.getNodeAttributes())); attributesTable.setPreferredScrollableViewportSize(new Dimension(300, 400)); attributesTable.setFillsViewportHeight(true); attributesTable.setShowGrid(false);// w ww . j a va2 s .c om JScrollPane tablePanel = new JScrollPane(attributesTable); tablePanel.setSize(new Dimension(250, 400)); edgeAttributesTable = new JTable(new MyTableModel(dynamicNetwork.getEdgeAttributes())); edgeAttributesTable.setPreferredScrollableViewportSize(new Dimension(300, 400)); edgeAttributesTable.setFillsViewportHeight(true); edgeAttributesTable.setShowGrid(false); JScrollPane edgeTablePanel = new JScrollPane(edgeAttributesTable); edgeTablePanel.setSize(new Dimension(250, 400)); plotChartButton = new JButton("Plot Selected Attributes"); closeTab = new JButton("Close Tab"); plotChartButton.addActionListener(this); closeTab.addActionListener(this); buttonPanel = new JPanel(); buttonPanel.setLayout(new FlowLayout()); buttonPanel.add(plotChartButton); buttonPanel.add(closeTab); buttonPanel.setBorder(BorderFactory.createTitledBorder(null, "Options", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, new Font("SansSerif", 0, 12), Color.darkGray)); tablePanel.setBorder( BorderFactory.createTitledBorder(null, "Node Attributes", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, new Font("SansSerif", 0, 12), Color.darkGray)); edgeTablePanel.setBorder( BorderFactory.createTitledBorder(null, "Edge Attributes", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, new Font("SansSerif", 0, 12), Color.darkGray)); GroupLayout cytoLayout = new GroupLayout(this); this.setLayout(cytoLayout); this.add(tablePanel); this.add(buttonPanel); cytoLayout.setHorizontalGroup(cytoLayout.createParallelGroup(GroupLayout.Alignment.LEADING) .addComponent(tablePanel, GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE) .addComponent(edgeTablePanel, GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE) .addComponent(buttonPanel, GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE)); cytoLayout.setVerticalGroup( cytoLayout.createSequentialGroup().addComponent(tablePanel, 200, GroupLayout.DEFAULT_SIZE, 300) .addComponent(edgeTablePanel, 200, GroupLayout.DEFAULT_SIZE, 300) .addComponent(buttonPanel, GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE)); this.setVisible(true); }
From source file:src.examples.monalisa.gui.GeneticDrawingView.java
/** This method is called from within the constructor to * initialize the form.// w w w. j ava 2 s.co m * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { mainPanel = new javax.swing.JPanel(); chooseImage = new javax.swing.JButton(); startEvolution = new javax.swing.JToggleButton(); targetImageLabel = new javax.swing.JLabel(); JFreeChart chart = ChartFactory.createXYLineChart("Fitness versus Generation", "Generation", "Fitness", new XYSeriesCollection(new XYSeries("")), org.jfree.chart.plot.PlotOrientation.VERTICAL, false, false, false); chartPanel = new ChartPanel(chart); menuBar = new javax.swing.JMenuBar(); javax.swing.JMenu fileMenu = new javax.swing.JMenu(); javax.swing.JMenuItem exitMenuItem = new javax.swing.JMenuItem(); javax.swing.JMenu helpMenu = new javax.swing.JMenu(); javax.swing.JMenuItem aboutMenuItem = new javax.swing.JMenuItem(); mainPanel.setName("mainPanel"); // NOI18N javax.swing.ActionMap actionMap = org.jdesktop.application.Application .getInstance(src.examples.monalisa.gui.GeneticDrawingApp.class).getContext() .getActionMap(GeneticDrawingView.class, this); chooseImage.setAction(actionMap.get("chooseImage")); // NOI18N org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application .getInstance(src.examples.monalisa.gui.GeneticDrawingApp.class).getContext() .getResourceMap(GeneticDrawingView.class); chooseImage.setText(resourceMap.getString("chooseImage.text")); // NOI18N chooseImage.setName("chooseImage"); // NOI18N startEvolution.setAction(actionMap.get("startEvolution")); // NOI18N startEvolution.setText(resourceMap.getString("startEvolution.text")); // NOI18N startEvolution.setName("startEvolution"); // NOI18N targetImageLabel.setIcon(resourceMap.getIcon("targetImageLabel.icon")); // NOI18N targetImageLabel.setText(resourceMap.getString("targetImageLabel.text")); // NOI18N targetImageLabel.setName("targetImageLabel"); // NOI18N chartPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder()); chartPanel.setName("chartPanel"); // NOI18N org.jdesktop.layout.GroupLayout chartPanelLayout = new org.jdesktop.layout.GroupLayout(chartPanel); chartPanel.setLayout(chartPanelLayout); chartPanelLayout.setHorizontalGroup(chartPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(0, 399, Short.MAX_VALUE)); chartPanelLayout.setVerticalGroup(chartPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(0, 234, Short.MAX_VALUE)); org.jdesktop.layout.GroupLayout mainPanelLayout = new org.jdesktop.layout.GroupLayout(mainPanel); mainPanel.setLayout(mainPanelLayout); mainPanelLayout.setHorizontalGroup(mainPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(mainPanelLayout.createSequentialGroup().add(mainPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false) .add(mainPanelLayout.createSequentialGroup().add(47, 47, 47).add(chooseImage) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED).add(startEvolution) .add(38, 38, 38)) .add(org.jdesktop.layout.GroupLayout.TRAILING, mainPanelLayout.createSequentialGroup() .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(targetImageLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 200, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(80, 80, 80))) .add(chartPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap())); mainPanelLayout.setVerticalGroup(mainPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, mainPanelLayout.createSequentialGroup() .addContainerGap() .add(mainPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(org.jdesktop.layout.GroupLayout.LEADING, chartPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(mainPanelLayout.createSequentialGroup() .add(targetImageLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 202, Short.MAX_VALUE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(mainPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(startEvolution).add(chooseImage)))) .addContainerGap())); chooseImage.getAccessibleContext() .setAccessibleName(resourceMap.getString("jButton1.AccessibleContext.accessibleName")); // NOI18N menuBar.setName("menuBar"); // NOI18N fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N fileMenu.setName("fileMenu"); // NOI18N exitMenuItem.setAction(actionMap.get("quit")); // NOI18N exitMenuItem.setName("exitMenuItem"); // NOI18N fileMenu.add(exitMenuItem); menuBar.add(fileMenu); helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N helpMenu.setName("helpMenu"); // NOI18N aboutMenuItem.setAction(actionMap.get("showAboutBox")); // NOI18N aboutMenuItem.setName("aboutMenuItem"); // NOI18N helpMenu.add(aboutMenuItem); menuBar.add(helpMenu); setComponent(mainPanel); setMenuBar(menuBar); }
From source file:com.dvd.ui.UpdateBooking.java
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor./*w ww . j a va 2 s.c o m*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" // desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); label1 = new java.awt.Label(); jLabel1 = new javax.swing.JLabel(); errorLabel = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); bookingTable = new javax.swing.JTable(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setBackground(new java.awt.Color(106, 161, 172)); setResizable(false); jPanel1.setBackground(new java.awt.Color(23, 193, 111)); jPanel1.setForeground(new java.awt.Color(254, 238, 238)); label1.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); label1.setFont(new java.awt.Font("Ubuntu Medium", 0, 48)); // NOI18N label1.setForeground(new java.awt.Color(254, 254, 254)); label1.setText("DVD Shop"); jLabel1.setFont(new java.awt.Font("Ubuntu Medium", 0, 24)); // NOI18N jLabel1.setForeground(new java.awt.Color(254, 254, 254)); jLabel1.setText("View Booking"); errorLabel.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N errorLabel.setForeground(new java.awt.Color(226, 33, 33)); bookingTable.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[] { "Booking ID", "User ID", "DVD Copy Number", "Date" }) { Class[] types = new Class[] { java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Object.class }; public Class getColumnClass(int columnIndex) { return types[columnIndex]; } }); jScrollPane1.setViewportView(bookingTable); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addGap(0, 0, Short.MAX_VALUE) .addComponent(errorLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 275, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(114, 114, 114)) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addGap(269, 269, 269) .addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(label1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(jPanel1Layout.createSequentialGroup().addGap(32, 32, 32) .addComponent(jLabel1)))) .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addComponent( jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 770, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap() .addComponent(label1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addGap(0, 18, Short.MAX_VALUE) .addComponent(errorLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jLabel1)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(339, 339, 339))); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap().addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap())); pack(); }
From source file:com.clough.android.adbv.view.UpdateTableDialog.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 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(); jScrollPane1 = new javax.swing.JScrollPane(); resultTable = new javax.swing.JTable(); applyChangesButton = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); jPanel1.setAutoscrolls(true); resultTable.setModel(new javax.swing.table.DefaultTableModel(new Object[][] { }, new String[] { })); resultTable.getTableHeader().setReorderingAllowed(false); resultTable.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { resultTableMouseClicked(evt); } }); jScrollPane1.setViewportView(resultTable); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jScrollPane1)); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1)); applyChangesButton.setText("Apply changes"); applyChangesButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { applyChangesButtonActionPerformed(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) .addGroup(layout.createSequentialGroup().addGap(0, 350, Short.MAX_VALUE) .addComponent(applyChangesButton)) .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(applyChangesButton).addContainerGap())); pack(); }
From source file:view.PlotterView.java
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor.// w w w .ja v a2 s .c o m */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { chartJPanel = new javax.swing.JPanel(); xAxisVariableJComboBox = new javax.swing.JComboBox<>(); jLabel1 = new javax.swing.JLabel(); startJButton = new javax.swing.JButton(); filePathJTextField = new javax.swing.JTextField(); jLabel2 = new javax.swing.JLabel(); quantityJComboBox = new javax.swing.JComboBox<>(); jLabel3 = new javax.swing.JLabel(); sizeJComboBox = new javax.swing.JComboBox<>(); jLabel4 = new javax.swing.JLabel(); typeJComboBox = new javax.swing.JComboBox<>(); jLabel5 = new javax.swing.JLabel(); machineJComboBox = new javax.swing.JComboBox<>(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("Result Plotter"); setResizable(false); chartJPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder()); chartJPanel.setLayout(new java.awt.BorderLayout()); xAxisVariableJComboBox.setModel( new javax.swing.DefaultComboBoxModel<>(new String[] { "Quantity", "Size", "Type", "Machine" })); xAxisVariableJComboBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { xAxisVariableJComboBoxActionPerformed(evt); } }); jLabel1.setText(" X-axis Variable:"); startJButton.setText("Start"); filePathJTextField.setToolTipText("Path to file"); jLabel2.setText("Quantity:"); quantityJComboBox .setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "10", "50", "100", "200" })); jLabel3.setText("Size:"); sizeJComboBox.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "1mb", "10mb", "50mb" })); jLabel4.setText("Type:"); typeJComboBox.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Binary", "Textual" })); jLabel5.setText("Mquina:"); machineJComboBox .setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "caio", "dilts", "Jonathan" })); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addGap(0, 0, Short.MAX_VALUE).addComponent(startJButton, javax.swing.GroupLayout.PREFERRED_SIZE, 510, javax.swing.GroupLayout.PREFERRED_SIZE)) .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(xAxisVariableJComboBox, 0, 164, Short.MAX_VALUE) .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(quantityJComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(sizeJComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(typeJComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup().addComponent(jLabel4) .addGap(0, 0, Short.MAX_VALUE)) .addComponent(machineJComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(filePathJTextField).addComponent(chartJPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 510, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(xAxisVariableJComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18).addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(quantityJComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jLabel3) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(sizeJComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jLabel4) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(typeJComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jLabel5) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(machineJComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(chartJPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 284, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(filePathJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(startJButton).addContainerGap(50, Short.MAX_VALUE))); pack(); }
From source file:org.nekorp.workflow.desktop.view.BasicPagoCobranzaView.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 2s . c o m*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); jToolBar1 = new javax.swing.JToolBar(); borrar = new javax.swing.JButton(); jLabel4 = new javax.swing.JLabel(); fechaPago = new org.nekorp.workflow.desktop.view.binding.SimpleBindableJSppiner(); jLabel2 = new javax.swing.JLabel(); responsable = new org.nekorp.workflow.desktop.view.binding.SimpleBindableJTextField(); jLabel1 = new javax.swing.JLabel(); monto = new org.nekorp.workflow.desktop.view.binding.MonedaBindableJTextField(); jScrollPane2 = new org.nekorp.workflow.desktop.view.resource.imp.MouseFreeJScrollPane(); detalle = new org.nekorp.workflow.desktop.view.binding.SimpleBindableJTextArea(); setBackground(new java.awt.Color(255, 255, 255)); setMaximumSize(new java.awt.Dimension(32767, 89)); jPanel1.setBackground(new java.awt.Color(255, 255, 255)); jToolBar1.setBorder(null); jToolBar1.setFloatable(false); jToolBar1.setRollover(true); borrar.setBackground(new java.awt.Color(255, 255, 255)); borrar.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N borrar.setText("Borrar"); borrar.setFocusable(false); borrar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); borrar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); borrar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { borrarActionPerformed(evt); } }); jToolBar1.add(borrar); jLabel4.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N jLabel4.setText("Fecha pago"); fechaPago.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N fechaPago.setModel( new javax.swing.SpinnerDateModel(new java.util.Date(), null, null, java.util.Calendar.MINUTE)); jLabel2.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N jLabel2.setText("Responsable"); responsable.setBackground(new java.awt.Color(224, 230, 230)); responsable.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N responsable.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(224, 230, 230), 4)); jLabel1.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N jLabel1.setText("monto"); monto.setBackground(new java.awt.Color(224, 230, 230)); monto.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N monto.setText("jTextField1"); monto.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(224, 230, 230), 4)); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addComponent(jLabel4) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(fechaPago, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18).addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(responsable, javax.swing.GroupLayout.DEFAULT_SIZE, 152, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(monto, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))); jPanel1Layout .setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jToolBar1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel4) .addComponent(fechaPago, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2) .addComponent(responsable, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel1).addComponent(monto, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))); jScrollPane2.setBorder(null); jScrollPane2.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); jScrollPane2.setWheelScrollingEnabled(false); detalle.setBackground(new java.awt.Color(224, 230, 230)); detalle.setColumns(20); detalle.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N detalle.setLineWrap(true); detalle.setRows(2); jScrollPane2.setViewportView(detalle); 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(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jScrollPane2)) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))); }
From source file:org.nekorp.workflow.desktop.view.EvidenciaEventoView.java
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor.//from w ww. j a va 2 s . c om */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jToolBar1 = new javax.swing.JToolBar(); filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); nueva = new javax.swing.JButton(); navigate = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); previewContent = new javax.swing.JPanel(); image = new javax.swing.JPanel(); setBackground(new java.awt.Color(255, 255, 255)); jToolBar1.setBackground(new java.awt.Color(102, 102, 102)); jToolBar1.setFloatable(false); jToolBar1.setRollover(true); jToolBar1.add(filler1); nueva.setBackground(new java.awt.Color(102, 102, 102)); nueva.setForeground(new java.awt.Color(255, 255, 255)); nueva.setText("Nueva Imagen"); nueva.setFocusable(false); nueva.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); nueva.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); nueva.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { nuevaActionPerformed(evt); } }); jToolBar1.add(nueva); navigate.setBackground(new java.awt.Color(102, 102, 102)); navigate.setLayout(new java.awt.BorderLayout()); jScrollPane1.setBackground(new java.awt.Color(102, 102, 102)); jScrollPane1.setBorder(null); jScrollPane1.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS); jScrollPane1.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER); previewContent.setBackground(new java.awt.Color(102, 102, 102)); previewContent.setLayout(new javax.swing.BoxLayout(previewContent, javax.swing.BoxLayout.X_AXIS)); jScrollPane1.setViewportView(previewContent); navigate.add(jScrollPane1, java.awt.BorderLayout.CENTER); image.setBackground(new java.awt.Color(255, 255, 255)); image.setMaximumSize(new java.awt.Dimension(900, 600)); image.setLayout(new java.awt.BorderLayout()); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jToolBar1, javax.swing.GroupLayout.DEFAULT_SIZE, 980, Short.MAX_VALUE) .addComponent(navigate, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(image, javax.swing.GroupLayout.Alignment.TRAILING, 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() .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, 0) .addComponent(image, javax.swing.GroupLayout.DEFAULT_SIZE, 395, Short.MAX_VALUE) .addGap(0, 0, 0).addComponent(navigate, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE))); }
From source file:com.sf.energy.transfer.form.TransferConfiguration.java
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" // desc="Generated Code">//GEN-BEGIN:initComponents /**//from w w w .ja va2s . co m * ? */ private void initComponents() { jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); connType = new javax.swing.JComboBox(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); ipAddress = new javax.swing.JTextField(); ipPort = new javax.swing.JTextField(); reset = new javax.swing.JButton(); submit = new javax.swing.JButton(); String ip = null; String port = null; try { config = Configuration.getConfiguration(); } catch (ConfigurationException e) { // TODO Auto-generated catch block e.printStackTrace(); } config.setAutoSave(true); ip = config.getString("transfer.transferIP"); port = config.getString("transfer.transferPort"); if (null != ip && !"".equals(ip)) { ipAddress.setText(ip); } if (null != ip && !"".equals(ip)) { ipPort.setText(port); } setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); setTitle("?"); jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel1.setText("?"); connType.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "" })); jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel2.setText(" ? IP"); jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel3.setText("??"); reset.setText("?"); reset.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { resetActionPerformed(evt); } }); submit.setText(""); submit.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { submitActionPerformed(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(52, Short.MAX_VALUE) .addGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(reset).addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel1).addComponent(jLabel2).addComponent(jLabel3))) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout .createSequentialGroup().addGap(17, 17, 17) .addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(ipPort, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(jPanel1Layout .createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(connType, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(ipAddress, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(29, 29, 29)) .addGroup(jPanel1Layout.createSequentialGroup().addGap(49, 49, 49) .addComponent(submit) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addGap(32, 32, 32).addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel1) .addComponent(connType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(21, 21, 21) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2).addComponent(ipAddress, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(28, 28, 28) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel3).addComponent(ipPort, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(reset).addComponent(submit)) .addContainerGap(26, Short.MAX_VALUE))); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap().addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap().addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap())); pack(); }