List of usage examples for javax.swing GroupLayout DEFAULT_SIZE
int DEFAULT_SIZE
To view the source code for javax.swing GroupLayout DEFAULT_SIZE.
Click Source Link
From source file:eu.dety.burp.joseph.attacks.bleichenbacher_pkcs1.gui.BleichenbacherPkcs1DecryptionAttackPanel.java
/** * This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this * method is always regenerated by the Form Editor. */// w ww .j a v a2s . c o m @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" // desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { cekFormatButtonGroup = new javax.swing.ButtonGroup(); startAttackButton = new javax.swing.JButton(); cancelAttackButton = new javax.swing.JButton(); jSeparator1 = new javax.swing.JSeparator(); timeElapsedLabel = new javax.swing.JLabel(); amountRequestsLabel = new javax.swing.JLabel(); currentSLabel = new javax.swing.JLabel(); resultKeyLabel = new javax.swing.JLabel(); cekFormatHex = new javax.swing.JRadioButton(); cekFormatB64 = new javax.swing.JRadioButton(); attackDescription = new javax.swing.JLabel(); timeElapsedValue = new javax.swing.JLabel(); amountRequestsValue = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); currentSValue = new javax.swing.JTextArea(); jScrollPane2 = new javax.swing.JScrollPane(); resultContentValue = new javax.swing.JTextArea(); resultContentLabel = new javax.swing.JLabel(); jScrollPane3 = new javax.swing.JScrollPane(); resultKeyValue = new javax.swing.JTextArea(); java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("JOSEPH"); // NOI18N startAttackButton.setText(bundle.getString("STARTATTACKBUTTON")); // NOI18N startAttackButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { startAttackButtonActionPerformed(evt); } }); cancelAttackButton.setText(bundle.getString("CANCELATTACKBUTTON")); // NOI18N cancelAttackButton.setEnabled(false); cancelAttackButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cancelAttackButtonActionPerformed(evt); } }); timeElapsedLabel.setText(bundle.getString("TIME_ELAPSED")); // NOI18N amountRequestsLabel.setText(bundle.getString("AMOUNT_REQUESTS")); // NOI18N currentSLabel.setText(bundle.getString("FOUND_S")); // NOI18N resultKeyLabel.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N resultKeyLabel.setText(bundle.getString("RESULT_CEK")); // NOI18N cekFormatButtonGroup.add(cekFormatHex); cekFormatHex.setSelected(true); cekFormatHex.setText(bundle.getString("HEX")); // NOI18N cekFormatHex.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cekFormatHexActionPerformed(evt); } }); cekFormatButtonGroup.add(cekFormatB64); cekFormatB64.setText(bundle.getString("BASE64URL")); // NOI18N cekFormatB64.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cekFormatB64ActionPerformed(evt); } }); attackDescription.setText( "<html><em>Note: This attack will take several minutes and performs thousands of requests to the server!</em><br />This attack is only successful, if the valid oracle responses are correctly marked.</html>"); timeElapsedValue.setText("00:00:00"); timeElapsedValue.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT); amountRequestsValue.setText("0"); amountRequestsValue.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT); jScrollPane1.setBackground(new java.awt.Color(251, 251, 251)); jScrollPane1.setBorder(null); jScrollPane1.setForeground(new java.awt.Color(0, 0, 0)); currentSValue.setEditable(false); currentSValue.setBackground(new java.awt.Color(251, 251, 251)); currentSValue.setColumns(20); currentSValue.setForeground(new java.awt.Color(0, 0, 0)); currentSValue.setLineWrap(true); currentSValue.setRows(4); currentSValue.setTabSize(4); currentSValue.setText("0"); currentSValue.setWrapStyleWord(true); currentSValue.setBorder(null); jScrollPane1.setViewportView(currentSValue); jScrollPane2.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); resultContentValue.setEditable(false); resultContentValue.setColumns(20); resultContentValue.setLineWrap(true); resultContentValue.setRows(5); resultContentValue.setWrapStyleWord(true); resultContentValue.setBorder(null); jScrollPane2.setViewportView(resultContentValue); resultContentLabel.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N resultContentLabel.setText(bundle.getString("RESULT_CONTENT")); // NOI18N jScrollPane3.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); resultKeyValue.setEditable(false); resultKeyValue.setColumns(20); resultKeyValue.setLineWrap(true); resultKeyValue.setRows(5); resultKeyValue.setWrapStyleWord(true); resultKeyValue.setBorder(null); jScrollPane3.setViewportView(resultKeyValue); 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) .addGroup(layout.createSequentialGroup().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(attackDescription, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 922, Short.MAX_VALUE) .addComponent(jSeparator1) .addGroup(layout.createSequentialGroup().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addComponent(startAttackButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(cancelAttackButton)) .addGroup(layout.createSequentialGroup().addComponent(cekFormatHex) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(cekFormatB64)) .addComponent(resultKeyLabel) .addGroup(layout.createSequentialGroup().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(currentSLabel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(amountRequestsLabel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(timeElapsedLabel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout .createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(timeElapsedValue, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 576, Short.MAX_VALUE) .addComponent(amountRequestsValue, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING))) .addComponent(resultContentLabel)).addGap(0, 0, Short.MAX_VALUE))) .addContainerGap()) .addGroup(layout.createSequentialGroup().addGap(6, 6, 6) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 700, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 700, 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(attackDescription, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(startAttackButton).addComponent(cancelAttackButton)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(timeElapsedLabel).addComponent(timeElapsedValue)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(amountRequestsLabel).addComponent(amountRequestsValue)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(currentSLabel).addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(resultKeyLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(cekFormatHex).addComponent(cekFormatB64)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(resultContentLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(68, Short.MAX_VALUE))); }
From source file:drusy.ui.panels.InternetStatePanel.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner Evaluation license - Kvin Renella headerPanel = new JPanel(); label1 = new JLabel(); mainPanel = new JPanel(); ipv4TitleLabel = new JLabel(); ipv4ContentLabel = new JTextField(); connectionStateTitleLabel = new JLabel(); connectionStateContentLabel = new JTextField(); downloadContentLabel = new JTextField(); downloadTitleLabel = new JLabel(); maxUploadTitleLabel = new JLabel(); maxUploadContentLabel = new JTextField(); maxDownloadTitleLabel = new JLabel(); maxDownloadContentLabel = new JTextField(); uploadTitleLabel = new JLabel(); uploadContentLabel = new JTextField(); ipv6ContentLabel = new JTextField(); ipv6TitleLabel = new JLabel(); uptimeContentLabel = new JTextField(); uptimeTitleLabel = new JLabel(); //======== this ======== setMinimumSize(new Dimension(100, 71)); setLayout(new BorderLayout()); //======== headerPanel ======== {//from w w w .j a v a 2s . co m headerPanel.setLayout(new BorderLayout()); //---- label1 ---- label1.setText("This panel shows you an overview of the internet connection"); label1.setHorizontalAlignment(SwingConstants.CENTER); headerPanel.add(label1, BorderLayout.CENTER); } add(headerPanel, BorderLayout.NORTH); //======== mainPanel ======== { mainPanel.setOpaque(false); mainPanel.setMinimumSize(new Dimension(100, 100)); //---- ipv4TitleLabel ---- ipv4TitleLabel.setText("IP v4 :"); ipv4TitleLabel.setHorizontalAlignment(SwingConstants.RIGHT); //---- ipv4ContentLabel ---- ipv4ContentLabel.setEditable(false); ipv4ContentLabel.setText("192.168.0.1"); ipv4ContentLabel.setHorizontalAlignment(SwingConstants.CENTER); //---- connectionStateTitleLabel ---- connectionStateTitleLabel.setText("Connection State :"); connectionStateTitleLabel.setHorizontalAlignment(SwingConstants.RIGHT); //---- connectionStateContentLabel ---- connectionStateContentLabel.setEditable(false); connectionStateContentLabel.setText("up"); connectionStateContentLabel.setHorizontalAlignment(SwingConstants.CENTER); //---- downloadContentLabel ---- downloadContentLabel.setEditable(false); downloadContentLabel.setText("- ko/s"); downloadContentLabel.setHorizontalAlignment(SwingConstants.CENTER); //---- downloadTitleLabel ---- downloadTitleLabel.setText("Download Bandwidth :"); downloadTitleLabel.setHorizontalAlignment(SwingConstants.RIGHT); //---- maxUploadTitleLabel ---- maxUploadTitleLabel.setText("Max Upload Bandwidth :"); maxUploadTitleLabel.setHorizontalAlignment(SwingConstants.RIGHT); //---- maxUploadContentLabel ---- maxUploadContentLabel.setEditable(false); maxUploadContentLabel.setText("- ko/s"); maxUploadContentLabel.setHorizontalAlignment(SwingConstants.CENTER); //---- maxDownloadTitleLabel ---- maxDownloadTitleLabel.setText("Max Download Bandwidth :"); maxDownloadTitleLabel.setHorizontalAlignment(SwingConstants.RIGHT); //---- maxDownloadContentLabel ---- maxDownloadContentLabel.setEditable(false); maxDownloadContentLabel.setText("- ko/s"); maxDownloadContentLabel.setHorizontalAlignment(SwingConstants.CENTER); //---- uploadTitleLabel ---- uploadTitleLabel.setText("Upload Bandwidth :"); uploadTitleLabel.setHorizontalAlignment(SwingConstants.RIGHT); //---- uploadContentLabel ---- uploadContentLabel.setEditable(false); uploadContentLabel.setText("- ko/s"); uploadContentLabel.setHorizontalAlignment(SwingConstants.CENTER); //---- ipv6ContentLabel ---- ipv6ContentLabel.setEditable(false); ipv6ContentLabel.setText("::1:"); ipv6ContentLabel.setHorizontalAlignment(SwingConstants.CENTER); //---- ipv6TitleLabel ---- ipv6TitleLabel.setText("IP v6 :"); ipv6TitleLabel.setHorizontalAlignment(SwingConstants.RIGHT); //---- uptimeContentLabel ---- uptimeContentLabel.setEditable(false); uptimeContentLabel.setText("0 min"); uptimeContentLabel.setHorizontalAlignment(SwingConstants.CENTER); //---- uptimeTitleLabel ---- uptimeTitleLabel.setText("Uptime :"); uptimeTitleLabel.setHorizontalAlignment(SwingConstants.RIGHT); GroupLayout mainPanelLayout = new GroupLayout(mainPanel); mainPanel.setLayout(mainPanelLayout); mainPanelLayout.setHorizontalGroup(mainPanelLayout.createParallelGroup() .addGroup(mainPanelLayout.createSequentialGroup().addContainerGap() .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.TRAILING) .addComponent(connectionStateTitleLabel).addComponent(downloadTitleLabel) .addComponent(ipv4TitleLabel).addComponent(maxUploadTitleLabel) .addComponent(maxDownloadTitleLabel).addComponent(uploadTitleLabel) .addComponent(ipv6TitleLabel).addComponent(uptimeTitleLabel)) .addGap(10, 10, 10) .addGroup(mainPanelLayout.createParallelGroup() .addComponent(ipv4ContentLabel, GroupLayout.DEFAULT_SIZE, 244, Short.MAX_VALUE) .addComponent(connectionStateContentLabel, GroupLayout.DEFAULT_SIZE, 244, Short.MAX_VALUE) .addComponent(downloadContentLabel, GroupLayout.DEFAULT_SIZE, 244, Short.MAX_VALUE) .addComponent(maxUploadContentLabel, GroupLayout.DEFAULT_SIZE, 244, Short.MAX_VALUE) .addComponent(maxDownloadContentLabel, GroupLayout.DEFAULT_SIZE, 244, Short.MAX_VALUE) .addComponent(uploadContentLabel, GroupLayout.DEFAULT_SIZE, 244, Short.MAX_VALUE) .addComponent(ipv6ContentLabel, GroupLayout.DEFAULT_SIZE, 244, Short.MAX_VALUE) .addComponent(uptimeContentLabel, GroupLayout.DEFAULT_SIZE, 244, Short.MAX_VALUE)) .addContainerGap())); mainPanelLayout.setVerticalGroup(mainPanelLayout.createParallelGroup() .addGroup(mainPanelLayout.createSequentialGroup().addGap(20, 20, 20) .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(ipv4TitleLabel, GroupLayout.PREFERRED_SIZE, 22, GroupLayout.PREFERRED_SIZE) .addComponent(ipv4ContentLabel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(ipv6TitleLabel, GroupLayout.PREFERRED_SIZE, 22, GroupLayout.PREFERRED_SIZE) .addComponent(ipv6ContentLabel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(connectionStateTitleLabel, GroupLayout.PREFERRED_SIZE, 22, GroupLayout.PREFERRED_SIZE) .addComponent(connectionStateContentLabel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(uploadTitleLabel, GroupLayout.PREFERRED_SIZE, 22, GroupLayout.PREFERRED_SIZE) .addComponent(uploadContentLabel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(maxUploadTitleLabel, GroupLayout.PREFERRED_SIZE, 22, GroupLayout.PREFERRED_SIZE) .addComponent(maxUploadContentLabel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(downloadTitleLabel, GroupLayout.PREFERRED_SIZE, 22, GroupLayout.PREFERRED_SIZE) .addComponent(downloadContentLabel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(maxDownloadTitleLabel, GroupLayout.PREFERRED_SIZE, 22, GroupLayout.PREFERRED_SIZE) .addComponent(maxDownloadContentLabel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(uptimeTitleLabel, GroupLayout.PREFERRED_SIZE, 22, GroupLayout.PREFERRED_SIZE) .addComponent(uptimeContentLabel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addContainerGap())); } add(mainPanel, BorderLayout.CENTER); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:gtu._work.ui.RegexDirReplacer.java
private void initGUI() { try {//from www . jav a 2 s. co m { } BorderLayout thisLayout = new BorderLayout(); getContentPane().setLayout(thisLayout); this.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); { jTabbedPane1 = new JTabbedPane(); getContentPane().add(jTabbedPane1, BorderLayout.CENTER); { jPanel1 = new JPanel(); BorderLayout jPanel1Layout = new BorderLayout(); jPanel1.setLayout(jPanel1Layout); jTabbedPane1.addTab("source", null, jPanel1, null); { jScrollPane1 = new JScrollPane(); jPanel1.add(jScrollPane1, BorderLayout.CENTER); { ListModel srcListModel = new DefaultListModel(); srcList = new JList(); jScrollPane1.setViewportView(srcList); srcList.setModel(srcListModel); { panel = new JPanel(); jScrollPane1.setRowHeaderView(panel); panel.setLayout(new FormLayout( new ColumnSpec[] { ColumnSpec.decode("default:grow"), }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, })); { childrenDirChkbox = new JCheckBox("??"); childrenDirChkbox.setSelected(true); panel.add(childrenDirChkbox, "1, 1"); } { subFileNameText = new JTextField(); panel.add(subFileNameText, "1, 2, fill, default"); subFileNameText.setColumns(10); subFileNameText.setText("(txt|java)"); } { replaceOldFileChkbox = new JCheckBox(""); replaceOldFileChkbox.setSelected(true); panel.add(replaceOldFileChkbox, "1, 3"); } { charsetText = new JTextField(); panel.add(charsetText, "1, 5, fill, default"); charsetText.setColumns(10); charsetText.setText("UTF8"); } } srcList.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent evt) { JListUtil.newInstance(srcList).defaultMouseClickOpenFile(evt); JPopupMenuUtil.newInstance(srcList).applyEvent(evt)// .addJMenuItem("load files from clipboard", new ActionListener() { public void actionPerformed(ActionEvent arg0) { String content = ClipboardUtil.getInstance().getContents(); DefaultListModel model = (DefaultListModel) srcList.getModel(); StringTokenizer tok = new StringTokenizer(content, "\t\n\r\f", false); for (; tok.hasMoreElements();) { String val = ((String) tok.nextElement()).trim(); model.addElement(new File(val)); } } }).show(); } }); srcList.addKeyListener(new KeyAdapter() { public void keyPressed(KeyEvent evt) { JListUtil.newInstance(srcList).defaultJListKeyPressed(evt); } }); } } { addDirFiles = new JButton(); jPanel1.add(addDirFiles, BorderLayout.NORTH); addDirFiles.setText("add dir files"); addDirFiles.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { File file = JFileChooserUtil.newInstance().selectDirectoryOnly().showOpenDialog() .getApproveSelectedFile(); if (file == null || !file.isDirectory()) { return; } List<File> fileLst = new ArrayList<File>(); String subName = StringUtils.trimToEmpty(subFileNameText.getText()); if (StringUtils.isBlank(subName)) { subName = ".*"; } String patternStr = ".*\\." + subName; if (childrenDirChkbox.isSelected()) { FileUtil.searchFileMatchs(file, patternStr, fileLst); } else { for (File f : file.listFiles()) { if (f.isFile() && f.getName().matches(patternStr)) { fileLst.add(f); } } } DefaultListModel model = new DefaultListModel(); for (File f : fileLst) { model.addElement(f); } srcList.setModel(model); } }); } } { jPanel2 = new JPanel(); BorderLayout jPanel2Layout = new BorderLayout(); jPanel2.setLayout(jPanel2Layout); jTabbedPane1.addTab("param", null, jPanel2, null); { exeucte = new JButton(); jPanel2.add(exeucte, BorderLayout.SOUTH); exeucte.setText("exeucte"); exeucte.setPreferredSize(new java.awt.Dimension(491, 125)); exeucte.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { exeucteActionPerformed(evt); } }); } { jPanel3 = new JPanel(); GroupLayout jPanel3Layout = new GroupLayout((JComponent) jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel2.add(jPanel3, BorderLayout.CENTER); { repFromText = new JTextField(); } { repToText = new JTextField(); } jPanel3Layout.setHorizontalGroup(jPanel3Layout.createSequentialGroup() .addContainerGap(25, 25) .addGroup(jPanel3Layout.createParallelGroup() .addGroup(jPanel3Layout.createSequentialGroup().addComponent(repFromText, GroupLayout.PREFERRED_SIZE, 446, GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel3Layout.createSequentialGroup().addComponent(repToText, GroupLayout.PREFERRED_SIZE, 446, GroupLayout.PREFERRED_SIZE))) .addContainerGap(20, Short.MAX_VALUE)); jPanel3Layout.setVerticalGroup(jPanel3Layout.createSequentialGroup().addContainerGap() .addComponent(repFromText, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE) .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(repToText, GroupLayout.PREFERRED_SIZE, 24, GroupLayout.PREFERRED_SIZE) .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); } { addToTemplate = new JButton(); jPanel2.add(addToTemplate, BorderLayout.NORTH); addToTemplate.setText("add to template"); addToTemplate.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { prop.put(repFromText.getText(), repToText.getText()); reloadTemplateList(); } }); } } { jPanel4 = new JPanel(); BorderLayout jPanel4Layout = new BorderLayout(); jPanel4.setLayout(jPanel4Layout); jTabbedPane1.addTab("result", null, jPanel4, null); { jScrollPane2 = new JScrollPane(); jPanel4.add(jScrollPane2, BorderLayout.CENTER); { ListModel newRepListModel = new DefaultListModel(); newRepList = new JList(); jScrollPane2.setViewportView(newRepList); newRepList.setModel(newRepListModel); newRepList.addMouseListener(new MouseAdapter() { static final String tortoiseMergeExe = "TortoiseMerge.exe"; static final String commandFormat = "cmd /c call \"%s\" /base:\"%s\" /theirs:\"%s\""; public void mouseClicked(MouseEvent evt) { if (!JListUtil.newInstance(newRepList).isCorrectMouseClick(evt)) { return; } OldNewFile oldNewFile = (OldNewFile) JListUtil .getLeadSelectionObject(newRepList); String base = oldNewFile.newFile.getAbsolutePath(); String theirs = oldNewFile.oldFile.getAbsolutePath(); String command = String.format(commandFormat, tortoiseMergeExe, base, theirs); System.out.println(command); try { Runtime.getRuntime().exec(command); } catch (IOException e) { JCommonUtil.handleException(e); } } }); newRepList.addKeyListener(new KeyAdapter() { public void keyPressed(KeyEvent evt) { Object[] objects = (Object[]) newRepList.getSelectedValues(); if (objects == null || objects.length == 0) { return; } DefaultListModel model = (DefaultListModel) newRepList.getModel(); int lastIndex = model.getSize() - 1; Object swap = null; StringBuilder dsb = new StringBuilder(); for (Object current : objects) { int index = model.indexOf(current); switch (evt.getKeyCode()) { case 38:// up if (index != 0) { swap = model.getElementAt(index - 1); model.setElementAt(swap, index); model.setElementAt(current, index - 1); } break; case 40:// down if (index != lastIndex) { swap = model.getElementAt(index + 1); model.setElementAt(swap, index); model.setElementAt(current, index + 1); } break; case 127:// del OldNewFile current_ = (OldNewFile) current; dsb.append(current_.newFile.getName() + "\t" + (current_.newFile.delete() ? "T" : "F") + "\n"); current_.newFile.delete(); model.removeElement(current); } } if (dsb.length() > 0) { JOptionPaneUtil.newInstance().iconInformationMessage() .showMessageDialog("del result!\n" + dsb, "DELETE"); } } }); } } { replaceOrignFile = new JButton(); jPanel4.add(replaceOrignFile, BorderLayout.SOUTH); replaceOrignFile.setText("replace orign file"); replaceOrignFile.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { DefaultListModel model = (DefaultListModel) newRepList.getModel(); StringBuilder sb = new StringBuilder(); for (int ii = 0; ii < model.size(); ii++) { OldNewFile file = (OldNewFile) model.getElementAt(ii); boolean delSuccess = false; boolean renameSuccess = false; if (delSuccess = file.oldFile.delete()) { renameSuccess = file.newFile.renameTo(file.oldFile); } sb.append(file.oldFile.getName() + " del:" + (delSuccess ? "T" : "F") + " rename:" + (renameSuccess ? "T" : "F") + "\n"); } JOptionPaneUtil.newInstance().iconInformationMessage().showMessageDialog(sb, getTitle()); } }); } } { jPanel5 = new JPanel(); BorderLayout jPanel5Layout = new BorderLayout(); jPanel5.setLayout(jPanel5Layout); jTabbedPane1.addTab("template", null, jPanel5, null); { jScrollPane3 = new JScrollPane(); jPanel5.add(jScrollPane3, BorderLayout.CENTER); { templateList = new JList(); reloadTemplateList(); jScrollPane3.setViewportView(templateList); templateList.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent evt) { if (templateList.getLeadSelectionIndex() == -1) { return; } Entry<Object, Object> entry = (Entry<Object, Object>) JListUtil .getLeadSelectionObject(templateList); repFromText.setText((String) entry.getKey()); repToText.setText((String) entry.getValue()); } }); templateList.addKeyListener(new KeyAdapter() { public void keyPressed(KeyEvent evt) { JListUtil.newInstance(templateList).defaultJListKeyPressed(evt); } }); } } { scheduleExecute = new JButton(); jPanel5.add(scheduleExecute, BorderLayout.SOUTH); scheduleExecute.setText("schedule execute"); scheduleExecute.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { scheduleExecuteActionPerformed(evt); } }); } } } this.setSize(512, 350); JCommonUtil.setFontAll(this.getRootPane()); JCommonUtil.frameCloseDo(this, new WindowAdapter() { public void windowClosing(WindowEvent paramWindowEvent) { if (StringUtils.isNotBlank(repFromText.getText())) { prop.put(repFromText.getText(), repToText.getText()); } try { prop.store(new FileOutputStream(propFile), "regexText"); } catch (Exception e) { JCommonUtil.handleException("properties store error!", e); } setVisible(false); dispose(); } }); } catch (Exception e) { e.printStackTrace(); } }
From source file:au.org.ala.delta.editor.ui.ActionSetsDialog.java
private void createUI() { setName("actionSetsDialog"); tabbedPane = new JTabbedPane(JTabbedPane.TOP); getContentPane().add(tabbedPane, BorderLayout.CENTER); conforTable = new JTable(); tabbedPane.addTab(_resources.getString("directiveTypeConfor.text"), new JScrollPane(conforTable)); intkeyTable = new JTable(); tabbedPane.addTab(_resources.getString("directiveTypeIntkey.text"), new JScrollPane(intkeyTable)); distTable = new JTable(); tabbedPane.addTab(_resources.getString("directiveTypeDist.text"), new JScrollPane(distTable)); keyTable = new JTable(); tabbedPane.addTab(_resources.getString("directiveTypeKey.text"), new JScrollPane(keyTable)); JPanel buttonPanel = new JPanel(); getContentPane().add(buttonPanel, BorderLayout.EAST); runButton = new JButton(); addButton = new JButton(); editButton = new JButton(); deleteButton = new JButton(); doneButton = new JButton(); GroupLayout gl_buttonPanel = new GroupLayout(buttonPanel); gl_buttonPanel.setHorizontalGroup(gl_buttonPanel.createParallelGroup(Alignment.LEADING) .addComponent(runButton, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(addButton, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(editButton, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(deleteButton, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(doneButton, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); gl_buttonPanel.setVerticalGroup(gl_buttonPanel.createParallelGroup(Alignment.LEADING) .addGroup(gl_buttonPanel.createSequentialGroup().addComponent(runButton).addComponent(addButton) .addComponent(editButton).addComponent(deleteButton).addComponent(doneButton))); buttonPanel.setLayout(gl_buttonPanel); JPanel labelPanel = new JPanel(); FlowLayout flowLayout = (FlowLayout) labelPanel.getLayout(); flowLayout.setHgap(20);/* w ww .j av a 2s.c o m*/ flowLayout.setAlignment(FlowLayout.LEFT); getContentPane().add(labelPanel, BorderLayout.NORTH); JLabel actionSetLabel = new JLabel(); actionSetLabel.setName("actionSetsActionSetsLabel"); labelPanel.add(actionSetLabel); actionSetDetailsLabel = new JLabel(""); labelPanel.add(actionSetDetailsLabel); }
From source file:EnrollFingerprint.Enroll.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 av a 2s .c om */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { buttonGroup1 = new javax.swing.ButtonGroup(); jPanelBackground = new javax.swing.JPanel(); picFingerprint = new javax.swing.JLabel(); jPanelConsole = new javax.swing.JPanel(); txtConsole = new javax.swing.JTextField(); lblConsole = new javax.swing.JLabel(); btnSave = new javax.swing.JButton(); btnCancel = new javax.swing.JButton(); jPanelLog = new javax.swing.JPanel(); JScrollPane1 = new javax.swing.JScrollPane(); txtLog = new javax.swing.JTextArea(); lblLog = new javax.swing.JLabel(); btnRead = new javax.swing.JButton(); lblStatus = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("Almacenar Huellas"); setResizable(false); jPanelBackground.setBackground(new java.awt.Color(238, 241, 245)); picFingerprint.setBackground(new java.awt.Color(255, 255, 255)); picFingerprint.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jPanelConsole.setBackground(new java.awt.Color(255, 255, 255)); txtConsole.setEditable(false); txtConsole.setForeground(new java.awt.Color(136, 136, 136)); txtConsole.setText("Consola de estado"); lblConsole.setForeground(new java.awt.Color(136, 136, 136)); lblConsole.setText("Consola:"); javax.swing.GroupLayout jPanelConsoleLayout = new javax.swing.GroupLayout(jPanelConsole); jPanelConsole.setLayout(jPanelConsoleLayout); jPanelConsoleLayout.setHorizontalGroup(jPanelConsoleLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelConsoleLayout.createSequentialGroup().addContainerGap() .addGroup(jPanelConsoleLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(txtConsole).addGroup(jPanelConsoleLayout.createSequentialGroup() .addComponent(lblConsole).addGap(0, 0, Short.MAX_VALUE))) .addContainerGap())); jPanelConsoleLayout.setVerticalGroup(jPanelConsoleLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelConsoleLayout.createSequentialGroup() .addGap(5, 5, 5).addComponent(lblConsole) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(txtConsole, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(15, Short.MAX_VALUE))); btnSave.setText("Guardar"); btnSave.setEnabled(false); btnSave.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnSaveActionPerformed(evt); } }); btnCancel.setText("Cancelar"); btnCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnCancelActionPerformed(evt); } }); jPanelLog.setBackground(new java.awt.Color(255, 255, 255)); txtLog.setEditable(false); txtLog.setColumns(20); txtLog.setForeground(new java.awt.Color(168, 168, 168)); txtLog.setRows(5); JScrollPane1.setViewportView(txtLog); lblLog.setForeground(new java.awt.Color(136, 136, 136)); lblLog.setText("Estado:"); javax.swing.GroupLayout jPanelLogLayout = new javax.swing.GroupLayout(jPanelLog); jPanelLog.setLayout(jPanelLogLayout); jPanelLogLayout.setHorizontalGroup(jPanelLogLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelLogLayout.createSequentialGroup().addContainerGap() .addGroup(jPanelLogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(JScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 409, Short.MAX_VALUE) .addGroup(jPanelLogLayout.createSequentialGroup().addComponent(lblLog).addGap(0, 0, Short.MAX_VALUE))) .addContainerGap())); jPanelLogLayout.setVerticalGroup(jPanelLogLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelLogLayout.createSequentialGroup().addContainerGap().addComponent(lblLog) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(JScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 192, Short.MAX_VALUE) .addContainerGap())); btnRead.setText("Leer Huella"); btnRead.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnReadActionPerformed(evt); } }); lblStatus.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N lblStatus.setText("Intentos"); javax.swing.GroupLayout jPanelBackgroundLayout = new javax.swing.GroupLayout(jPanelBackground); jPanelBackground.setLayout(jPanelBackgroundLayout); jPanelBackgroundLayout.setHorizontalGroup(jPanelBackgroundLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelBackgroundLayout.createSequentialGroup().addContainerGap() .addGroup(jPanelBackgroundLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(jPanelBackgroundLayout.createSequentialGroup() .addComponent(picFingerprint, javax.swing.GroupLayout.PREFERRED_SIZE, 250, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanelBackgroundLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanelConsole, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanelLog, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addGroup(jPanelBackgroundLayout.createSequentialGroup().addComponent(lblStatus) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(btnRead) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnSave) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnCancel))) .addContainerGap())); jPanelBackgroundLayout.setVerticalGroup(jPanelBackgroundLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelBackgroundLayout.createSequentialGroup().addContainerGap() .addGroup(jPanelBackgroundLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelBackgroundLayout.createSequentialGroup() .addComponent(jPanelConsole, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanelLog, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(picFingerprint, javax.swing.GroupLayout.PREFERRED_SIZE, 300, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 14, Short.MAX_VALUE) .addGroup(jPanelBackgroundLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(btnCancel).addComponent(btnSave).addComponent(btnRead) .addComponent(lblStatus)) .addContainerGap())); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanelBackground, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent( jPanelBackground, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); pack(); }
From source file:interfazGrafica.frmMoverRFC.java
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { ventanaGeneral = new javax.swing.JPanel(); panelGeneral = new javax.swing.JPanel(); nombreArchivo = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); listaArchivos = new javax.swing.JList(); panelPDF = new javax.swing.JPanel(); botonAnt = new javax.swing.JButton(); botonSig = new javax.swing.JButton(); BotonLigarCURPRFC = new javax.swing.JButton(); jScrollPane2 = new javax.swing.JScrollPane(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); txtCapturaCurp = new javax.swing.JTextField(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setBackground(new java.awt.Color(0, 0, 0)); ventanaGeneral.setBackground(new java.awt.Color(233, 233, 233)); ventanaGeneral.setForeground(new java.awt.Color(227, 227, 227)); ventanaGeneral.setMinimumSize(new java.awt.Dimension(1300, 500)); panelGeneral.setBackground(new java.awt.Color(255, 255, 255)); panelGeneral.setForeground(new java.awt.Color(102, 102, 102)); panelGeneral.setPreferredSize(new java.awt.Dimension(900, 600)); nombreArchivo.setFont(new java.awt.Font("Arial", 0, 36)); // NOI18N nombreArchivo.setForeground(new java.awt.Color(51, 51, 51)); nombreArchivo.setText(Nombre_Archivo); jScrollPane1.setBackground(new java.awt.Color(255, 255, 255)); jScrollPane1.setBorder(null);//from ww w . j a va 2 s .co m jScrollPane1.setForeground(new java.awt.Color(255, 255, 255)); listaArchivos.setBackground(new java.awt.Color(240, 240, 240)); listaArchivos.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N listaArchivos.setForeground(new java.awt.Color(102, 102, 102)); listaArchivos.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); listaArchivos.setFocusable(false); listaArchivos.setOpaque(false); listaArchivos.setRequestFocusEnabled(false); listaArchivos.setSelectionBackground(new java.awt.Color(153, 153, 153)); listaArchivos.setVerifyInputWhenFocusTarget(false); listaArchivos.setVisibleRowCount(0); jScrollPane1.setViewportView(listaArchivos); panelPDF.setBackground(new java.awt.Color(204, 204, 255)); javax.swing.GroupLayout panelPDFLayout = new javax.swing.GroupLayout(panelPDF); panelPDF.setLayout(panelPDFLayout); panelPDFLayout.setHorizontalGroup(panelPDFLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 1008, Short.MAX_VALUE)); panelPDFLayout.setVerticalGroup(panelPDFLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE)); botonAnt.setBackground(new java.awt.Color(204, 204, 204)); botonAnt.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/zoomOut.png"))); // NOI18N botonAnt.setToolTipText("Clic para alejar"); botonAnt.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); botonAnt.setFocusable(false); botonAnt.setRequestFocusEnabled(false); botonAnt.setRolloverEnabled(false); botonAnt.setVerifyInputWhenFocusTarget(false); botonAnt.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { botonAntActionPerformed(evt); } }); botonSig.setBackground(new java.awt.Color(204, 204, 204)); botonSig.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/zoomIn.png"))); // NOI18N botonSig.setToolTipText("Clic para acercar"); botonSig.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); botonSig.setFocusable(false); botonSig.setRequestFocusEnabled(false); botonSig.setRolloverEnabled(false); botonSig.setVerifyInputWhenFocusTarget(false); botonSig.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { botonSigActionPerformed(evt); } }); BotonLigarCURPRFC.setBackground(new java.awt.Color(255, 255, 255)); BotonLigarCURPRFC.setFont(new java.awt.Font("SansSerif", 0, 14)); // NOI18N BotonLigarCURPRFC.setText("Ligar CURP a RFC"); BotonLigarCURPRFC.setActionCommand("Asignar CURP al RFC"); BotonLigarCURPRFC.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(238, 100, 100), 1, true)); BotonLigarCURPRFC.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); BotonLigarCURPRFC.setFocusable(false); BotonLigarCURPRFC.setRequestFocusEnabled(false); BotonLigarCURPRFC.setRolloverEnabled(false); BotonLigarCURPRFC.setVerifyInputWhenFocusTarget(false); BotonLigarCURPRFC.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { BotonLigarCURPRFCActionPerformed(evt); } }); jLabel1.setText("Alejar rea Ampliada"); jLabel2.setText("Ampliar ?rea"); jLabel3.setText("Teclea el CURP:"); txtCapturaCurp.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtCapturaCurpActionPerformed(evt); } }); txtCapturaCurp.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtCapturaCurpKeyTyped(evt); } }); javax.swing.GroupLayout panelGeneralLayout = new javax.swing.GroupLayout(panelGeneral); panelGeneral.setLayout(panelGeneralLayout); panelGeneralLayout.setHorizontalGroup(panelGeneralLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panelGeneralLayout.createSequentialGroup().addContainerGap().addGroup(panelGeneralLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panelGeneralLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 211, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelGeneralLayout.createSequentialGroup().addComponent(botonSig) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(29, 29, 29))) .addGroup(panelGeneralLayout.createSequentialGroup().addComponent(botonAnt) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(BotonLigarCURPRFC, javax.swing.GroupLayout.PREFERRED_SIZE, 211, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(panelGeneralLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(txtCapturaCurp, javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 211, Short.MAX_VALUE))) .addGroup(panelGeneralLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panelGeneralLayout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(panelPDF, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(panelGeneralLayout.createSequentialGroup().addGap(46, 46, 46) .addComponent(nombreArchivo))) .addGap(18, 18, 18).addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(27, 27, 27))); panelGeneralLayout.setVerticalGroup(panelGeneralLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panelGeneralLayout.createSequentialGroup().addGroup(panelGeneralLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panelGeneralLayout.createSequentialGroup().addContainerGap() .addComponent(nombreArchivo) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(panelGeneralLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 616, Short.MAX_VALUE) .addComponent(panelPDF, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addGroup(panelGeneralLayout.createSequentialGroup().addGap(89, 89, 89) .addGroup(panelGeneralLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(botonSig, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(26, 26, 26) .addGroup(panelGeneralLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(botonAnt, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(73, 73, 73) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(txtCapturaCurp, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(134, 134, 134) .addComponent(BotonLigarCURPRFC, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(173, 173, 173).addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); javax.swing.GroupLayout ventanaGeneralLayout = new javax.swing.GroupLayout(ventanaGeneral); ventanaGeneral.setLayout(ventanaGeneralLayout); ventanaGeneralLayout.setHorizontalGroup(ventanaGeneralLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(ventanaGeneralLayout.createSequentialGroup().addComponent(panelGeneral, javax.swing.GroupLayout.PREFERRED_SIZE, 1311, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 9, Short.MAX_VALUE))); ventanaGeneralLayout.setVerticalGroup(ventanaGeneralLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(ventanaGeneralLayout.createSequentialGroup().addComponent(panelGeneral, javax.swing.GroupLayout.PREFERRED_SIZE, 687, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 22, 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(ventanaGeneral, 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() .addComponent(ventanaGeneral, 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:com.willwinder.universalgcodesender.ExperimentalWindow.java
/** This method is called from within the constructor to * initialize the form./*from ww w . j av a2 s.c o m*/ * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { controlContextTabbedPane = new javax.swing.JTabbedPane(); actionPanel = new com.willwinder.universalgcodesender.uielements.action.ActionPanel(backend); macroEditPanel = new javax.swing.JScrollPane(); macroPanel = new com.willwinder.universalgcodesender.uielements.MacroPanel(backend); visualizerPanel = new com.willwinder.universalgcodesender.visualizer.VisualizerPanel(backend); connectionPanel = new com.willwinder.universalgcodesender.uielements.connection.ConnectionPanel(backend); commandPanel = new com.willwinder.universalgcodesender.uielements.command.CommandPanel(backend); mainMenuBar = new javax.swing.JMenuBar(); settingsMenu = new javax.swing.JMenu(); grblConnectionSettingsMenuItem = new javax.swing.JMenuItem(); firmwareSettingsMenu = new javax.swing.JMenu(); grblFirmwareSettingsMenuItem = new javax.swing.JMenuItem(); pendantMenu = new com.willwinder.universalgcodesender.uielements.pendant.PendantMenu(backend); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setMinimumSize(new java.awt.Dimension(640, 520)); controlContextTabbedPane.setBorder(javax.swing.BorderFactory.createTitledBorder("")); controlContextTabbedPane.setMinimumSize(new java.awt.Dimension(395, 175)); controlContextTabbedPane.setPreferredSize(new java.awt.Dimension(2000, 283)); controlContextTabbedPane.addComponentListener(new java.awt.event.ComponentAdapter() { public void componentShown(java.awt.event.ComponentEvent evt) { controlContextTabbedPaneComponentShown(evt); } }); controlContextTabbedPane.addTab("Machine Control", actionPanel); macroEditPanel.setViewportView(macroPanel); controlContextTabbedPane.addTab("Macros", macroEditPanel); controlContextTabbedPane.addTab("Visualizer", visualizerPanel); connectionPanel.setMinimumSize(new java.awt.Dimension(1, 1)); connectionPanel.setPreferredSize(new java.awt.Dimension(275, 130)); settingsMenu.setText("Settings"); grblConnectionSettingsMenuItem.setText("Sender Settings"); grblConnectionSettingsMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { grblConnectionSettingsMenuItemActionPerformed(evt); } }); settingsMenu.add(grblConnectionSettingsMenuItem); firmwareSettingsMenu.setText("Firmware Settings"); grblFirmwareSettingsMenuItem.setText("GRBL"); grblFirmwareSettingsMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { grblFirmwareSettingsMenuItemActionPerformed(evt); } }); firmwareSettingsMenu.add(grblFirmwareSettingsMenuItem); settingsMenu.add(firmwareSettingsMenu); mainMenuBar.add(settingsMenu); pendantMenu.setText("Pendant"); mainMenuBar.add(pendantMenu); setJMenuBar(mainMenuBar); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(layout .createSequentialGroup() .add(connectionPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(controlContextTabbedPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 764, Short.MAX_VALUE) .add(commandPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))); layout.setVerticalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .add(controlContextTabbedPane, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 294, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(commandPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 350, Short.MAX_VALUE)) .add(connectionPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); pack(); }
From source file:de.tor.tribes.ui.views.DSWorkbenchRankFrame.java
/** This method is called from within the constructor to * initialize the form./*from w ww . j av a 2s .co m*/ * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; jXRankPanel = new org.jdesktop.swingx.JXPanel(); jRankTabPane = new javax.swing.JTabbedPane(); jxSearchPane = new org.jdesktop.swingx.JXPanel(); jXPanel2 = new org.jdesktop.swingx.JXPanel(); jButton12 = new javax.swing.JButton(); jTextField1 = new javax.swing.JTextField(); jLabel21 = new javax.swing.JLabel(); jFilterRows = new javax.swing.JCheckBox(); jFilterCaseSensitive = new javax.swing.JCheckBox(); jScrollPane2 = new javax.swing.JScrollPane(); jXColumnList = new org.jdesktop.swingx.JXList(); jLabel22 = new javax.swing.JLabel(); jAlwaysOnTop = new javax.swing.JCheckBox(); jRankPanel = new javax.swing.JPanel(); capabilityInfoPanel1 = new de.tor.tribes.ui.components.CapabilityInfoPanel(); jXRankPanel.setLayout(new java.awt.BorderLayout()); jXRankPanel.add(jRankTabPane, java.awt.BorderLayout.CENTER); jxSearchPane.setOpaque(false); jxSearchPane.setLayout(new java.awt.GridBagLayout()); jXPanel2.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jXPanel2.setInheritAlpha(false); jButton12.setText("Anwenden"); jButton12.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseReleased(java.awt.event.MouseEvent evt) { jButton12fireHideGlassPaneEvent(evt); } }); jTextField1.addCaretListener(new javax.swing.event.CaretListener() { public void caretUpdate(javax.swing.event.CaretEvent evt) { jTextField1fireHighlightEvent(evt); } }); jLabel21.setText("Suchbegriff"); jFilterRows.setText("Nur gefilterte Zeilen anzeigen"); jFilterRows.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { jFilterRowsfireUpdateFilterEvent(evt); } }); jFilterCaseSensitive.setText("Gro-/Kleinschreibung beachten"); jFilterCaseSensitive.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { jFilterCaseSensitivefireUpdateFilterEvent(evt); } }); jXColumnList.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]; } }); jXColumnList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); jScrollPane2.setViewportView(jXColumnList); jLabel22.setText("Spalten"); javax.swing.GroupLayout jXPanel2Layout = new javax.swing.GroupLayout(jXPanel2); jXPanel2.setLayout(jXPanel2Layout); jXPanel2Layout .setHorizontalGroup(jXPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jXPanel2Layout.createSequentialGroup().addContainerGap().addGroup(jXPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jLabel22, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( jLabel21, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(18, 18, 18) .addGroup(jXPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jXPanel2Layout.createSequentialGroup() .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addGroup(jXPanel2Layout .createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(jXPanel2Layout.createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(jFilterRows, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jFilterCaseSensitive, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addComponent(jButton12))) .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 355, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jXPanel2Layout.setVerticalGroup(jXPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jXPanel2Layout.createSequentialGroup().addContainerGap().addGroup(jXPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel21) .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jXPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jXPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jXPanel2Layout .createSequentialGroup().addComponent(jFilterCaseSensitive) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jFilterRows) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButton12)) .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 164, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jLabel22)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jxSearchPane.add(jXPanel2, new java.awt.GridBagConstraints()); setTitle("Rangliste"); getContentPane().setLayout(new java.awt.GridBagLayout()); jAlwaysOnTop.setText("Immer im Vordergrund"); jAlwaysOnTop.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { fireRankFrameAlwaysOnTopEvent(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); getContentPane().add(jAlwaysOnTop, gridBagConstraints); jRankPanel.setBackground(new java.awt.Color(239, 235, 223)); jRankPanel.setPreferredSize(new java.awt.Dimension(300, 400)); jRankPanel.setLayout(new java.awt.BorderLayout()); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.ipadx = 668; gridBagConstraints.ipady = 471; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; getContentPane().add(jRankPanel, gridBagConstraints); capabilityInfoPanel1.setBbSupport(false); capabilityInfoPanel1.setCopyable(false); capabilityInfoPanel1.setDeletable(false); capabilityInfoPanel1.setPastable(false); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); getContentPane().add(capabilityInfoPanel1, gridBagConstraints); pack(); }
From source file:ir.ac.iust.nlp.postagger.POSTaggerForm.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 a2s . c o m */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { rbgPOSTypeD2T = new javax.swing.ButtonGroup(); rbgPOSTypeT2D = new javax.swing.ButtonGroup(); jTabbedPane1 = new javax.swing.JTabbedPane(); pnlConverter = new javax.swing.JPanel(); tabConverter = new javax.swing.JTabbedPane(); pnlDep2Tag = new javax.swing.JPanel(); lblInputCoNLLFile = new javax.swing.JLabel(); txtInputCoNLLFile = new javax.swing.JTextField(); btnBrowseInputCoNLLFile = new javax.swing.JButton(); lblOutputTagPath = new javax.swing.JLabel(); txtOutputTagPath = new javax.swing.JTextField(); btnBrowseOutputTagPath = new javax.swing.JButton(); btnConertDep2Tag = new javax.swing.JButton(); chkAddGoldTag = new javax.swing.JCheckBox(); pnlPOSTypeD2T = new javax.swing.JPanel(); rbFPOSD2T = new javax.swing.JRadioButton(); rbCPOSD2T = new javax.swing.JRadioButton(); pnlTag2Dep = new javax.swing.JPanel(); lblInputTagFile = new javax.swing.JLabel(); txtInputTagFile = new javax.swing.JTextField(); btnBrowseInputTagFile = new javax.swing.JButton(); lblOutputDepPath = new javax.swing.JLabel(); txtOutputDepPath = new javax.swing.JTextField(); btnBrowseOutputDepPath = new javax.swing.JButton(); btnConvertTag2Dep = new javax.swing.JButton(); pnlPOSTypeT2D = new javax.swing.JPanel(); rbFPOST2D = new javax.swing.JRadioButton(); rbCPOST2D = new javax.swing.JRadioButton(); lblInputCoNLLFileT2D = new javax.swing.JLabel(); txtInputCoNLLFileT2D = new javax.swing.JTextField(); btnBrowseInputCoNLLFileT2D = new javax.swing.JButton(); pnlTrain = new javax.swing.JPanel(); lblTrainFile = new javax.swing.JLabel(); txtTrainFile = new javax.swing.JTextField(); btnBrowseTrainFile = new javax.swing.JButton(); lblTrainModelPath = new javax.swing.JLabel(); txtTrainModelPath = new javax.swing.JTextField(); btnBrowseTrainModelPath = new javax.swing.JButton(); lblMaxIters = new javax.swing.JLabel(); spMaxIters = new javax.swing.JSpinner(); btnStartTraining = new javax.swing.JButton(); jScrollbar2 = new javax.swing.JScrollPane(); txtTrainLog = new javax.swing.JTextArea(); pnlTag = new javax.swing.JPanel(); lblInputFile = new javax.swing.JLabel(); txtInputFile = new javax.swing.JTextField(); btnBrowseInputFile = new javax.swing.JButton(); lblOutputPath = new javax.swing.JLabel(); txtOutputPath = new javax.swing.JTextField(); btnBrowseOutputPath = new javax.swing.JButton(); chkGoldFile = new javax.swing.JCheckBox(); txtGoldFile = new javax.swing.JTextField(); btnBrowseGoldFile = new javax.swing.JButton(); tabTag = new javax.swing.JTabbedPane(); pnlTagLog = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); txtTagLog = new javax.swing.JTextArea(); pnlTagResults = new javax.swing.JPanel(); lblTagEvaluation = new javax.swing.JLabel(); jScrollPane2 = new javax.swing.JScrollPane(); lstWordsList = new javax.swing.JList(new DefaultListModel()); lblWordsList = new javax.swing.JLabel(); jScrollPane3 = new javax.swing.JScrollPane(); lstPredictedTags = new javax.swing.JList(new DefaultListModel()); jScrollPane4 = new javax.swing.JScrollPane(); lstGoldTags = new javax.swing.JList(new DefaultListModel()); lblPredictedTags = new javax.swing.JLabel(); lblGoldTags = new javax.swing.JLabel(); btnStartTagging = new javax.swing.JButton(); lblModelPath = new javax.swing.JLabel(); txtModelPath = new javax.swing.JTextField(); btnBrowseModelPath = new javax.swing.JButton(); pnlAbout = new javax.swing.JPanel(); lblMXPostTitle = new javax.swing.JLabel(); lblMXPostSiteTitle = new javax.swing.JLabel(); lblMXPostSiteValue = new javax.swing.JTextField(); lblMXPostAuthorsTitle = new javax.swing.JLabel(); lblMXPostAuthorsValue = new javax.swing.JTextField(); lblMXPostCitationTitle = new javax.swing.JLabel(); jScrollPane9 = new javax.swing.JScrollPane(); txtMXPostCitationValue = new javax.swing.JTextArea(); lblMXpostLicenseTitle = new javax.swing.JLabel(); jScrollPane5 = new javax.swing.JScrollPane(); txtMXPostLicenseValue = new javax.swing.JTextArea(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("POS Tagger"); lblInputCoNLLFile.setText("Input CoNLL File:"); txtInputCoNLLFile.setEditable(false); btnBrowseInputCoNLLFile.setText("..."); btnBrowseInputCoNLLFile.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnBrowseInputCoNLLFileActionPerformed(evt); } }); lblOutputTagPath.setText("Output Path:"); txtOutputTagPath.setEditable(false); btnBrowseOutputTagPath.setText("..."); btnBrowseOutputTagPath.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnBrowseOutputTagPathActionPerformed(evt); } }); btnConertDep2Tag.setText("Start Convert"); btnConertDep2Tag.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnConertDep2TagActionPerformed(evt); } }); chkAddGoldTag.setSelected(true); chkAddGoldTag.setText("Add Gold Tag"); pnlPOSTypeD2T.setBorder(javax.swing.BorderFactory.createTitledBorder("Type")); rbgPOSTypeD2T.add(rbFPOSD2T); rbFPOSD2T.setSelected(true); rbFPOSD2T.setText("Fine-grained POS"); rbgPOSTypeD2T.add(rbCPOSD2T); rbCPOSD2T.setText("Coarse-grained POS"); javax.swing.GroupLayout pnlPOSTypeD2TLayout = new javax.swing.GroupLayout(pnlPOSTypeD2T); pnlPOSTypeD2T.setLayout(pnlPOSTypeD2TLayout); pnlPOSTypeD2TLayout.setHorizontalGroup(pnlPOSTypeD2TLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(pnlPOSTypeD2TLayout.createSequentialGroup().addContainerGap() .addGroup(pnlPOSTypeD2TLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(rbFPOSD2T).addComponent(rbCPOSD2T)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); pnlPOSTypeD2TLayout .setVerticalGroup(pnlPOSTypeD2TLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(pnlPOSTypeD2TLayout.createSequentialGroup().addComponent(rbFPOSD2T) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(rbCPOSD2T))); javax.swing.GroupLayout pnlDep2TagLayout = new javax.swing.GroupLayout(pnlDep2Tag); pnlDep2Tag.setLayout(pnlDep2TagLayout); pnlDep2TagLayout.setHorizontalGroup(pnlDep2TagLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(pnlDep2TagLayout.createSequentialGroup().addContainerGap().addGroup(pnlDep2TagLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(pnlDep2TagLayout.createSequentialGroup() .addGroup(pnlDep2TagLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(lblInputCoNLLFile).addComponent(lblOutputTagPath)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(pnlDep2TagLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(txtInputCoNLLFile).addComponent(txtOutputTagPath)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(pnlDep2TagLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(btnBrowseOutputTagPath, javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE) .addComponent(btnBrowseInputCoNLLFile, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(pnlDep2TagLayout.createSequentialGroup() .addGroup(pnlDep2TagLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(chkAddGoldTag).addComponent(pnlPOSTypeD2T, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 398, Short.MAX_VALUE) .addComponent(btnConertDep2Tag))) .addContainerGap())); pnlDep2TagLayout.setVerticalGroup(pnlDep2TagLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(pnlDep2TagLayout.createSequentialGroup().addContainerGap().addGroup(pnlDep2TagLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lblInputCoNLLFile) .addComponent(txtInputCoNLLFile, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(btnBrowseInputCoNLLFile)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(pnlDep2TagLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lblOutputTagPath) .addComponent(txtOutputTagPath, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(btnBrowseOutputTagPath)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(pnlDep2TagLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(pnlDep2TagLayout.createSequentialGroup().addComponent(chkAddGoldTag) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(pnlPOSTypeD2T, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(btnConertDep2Tag)) .addContainerGap(146, Short.MAX_VALUE))); tabConverter.addTab("Dependency to Tagger", pnlDep2Tag); lblInputTagFile.setText("Input Tag File:"); txtInputTagFile.setEditable(false); btnBrowseInputTagFile.setText("..."); btnBrowseInputTagFile.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnBrowseInputTagFileActionPerformed(evt); } }); lblOutputDepPath.setText("Output Path:"); txtOutputDepPath.setEditable(false); btnBrowseOutputDepPath.setText("..."); btnBrowseOutputDepPath.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnBrowseOutputDepPathActionPerformed(evt); } }); btnConvertTag2Dep.setText("Start Convert"); btnConvertTag2Dep.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnConvertTag2DepActionPerformed(evt); } }); pnlPOSTypeT2D.setBorder(javax.swing.BorderFactory.createTitledBorder("Type")); rbgPOSTypeT2D.add(rbFPOST2D); rbFPOST2D.setSelected(true); rbFPOST2D.setText("Fine-grained POS"); rbgPOSTypeT2D.add(rbCPOST2D); rbCPOST2D.setText("Coarse-grained POS"); javax.swing.GroupLayout pnlPOSTypeT2DLayout = new javax.swing.GroupLayout(pnlPOSTypeT2D); pnlPOSTypeT2D.setLayout(pnlPOSTypeT2DLayout); pnlPOSTypeT2DLayout.setHorizontalGroup(pnlPOSTypeT2DLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(pnlPOSTypeT2DLayout.createSequentialGroup().addContainerGap() .addGroup(pnlPOSTypeT2DLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(rbFPOST2D).addComponent(rbCPOST2D)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); pnlPOSTypeT2DLayout .setVerticalGroup(pnlPOSTypeT2DLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(pnlPOSTypeT2DLayout.createSequentialGroup().addComponent(rbFPOST2D) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(rbCPOST2D))); lblInputCoNLLFileT2D.setText("Input CoNLL File:"); txtInputCoNLLFileT2D.setEditable(false); btnBrowseInputCoNLLFileT2D.setText("..."); btnBrowseInputCoNLLFileT2D.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnBrowseInputCoNLLFileT2DActionPerformed(evt); } }); javax.swing.GroupLayout pnlTag2DepLayout = new javax.swing.GroupLayout(pnlTag2Dep); pnlTag2Dep.setLayout(pnlTag2DepLayout); pnlTag2DepLayout.setHorizontalGroup(pnlTag2DepLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(pnlTag2DepLayout.createSequentialGroup().addContainerGap() .addGroup(pnlTag2DepLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(pnlTag2DepLayout.createSequentialGroup() .addComponent(pnlPOSTypeT2D, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 398, Short.MAX_VALUE) .addComponent(btnConvertTag2Dep)) .addGroup(pnlTag2DepLayout.createSequentialGroup() .addGroup(pnlTag2DepLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(lblInputTagFile).addComponent(lblOutputDepPath) .addComponent(lblInputCoNLLFileT2D)) .addGap(14, 14, 14) .addGroup(pnlTag2DepLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(txtInputTagFile).addComponent(txtInputCoNLLFileT2D) .addComponent(txtOutputDepPath)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(pnlTag2DepLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(btnBrowseInputCoNLLFileT2D, javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE) .addComponent(btnBrowseOutputDepPath, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) .addComponent(btnBrowseInputTagFile, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addContainerGap())); pnlTag2DepLayout.setVerticalGroup(pnlTag2DepLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(pnlTag2DepLayout.createSequentialGroup().addContainerGap().addGroup(pnlTag2DepLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(txtInputTagFile, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(btnBrowseInputTagFile).addComponent(lblInputTagFile)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(pnlTag2DepLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lblInputCoNLLFileT2D) .addComponent(txtInputCoNLLFileT2D, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(btnBrowseInputCoNLLFileT2D)) .addGap(8, 8, 8) .addGroup(pnlTag2DepLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(pnlTag2DepLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lblOutputDepPath).addComponent(txtOutputDepPath, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(btnBrowseOutputDepPath)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(pnlTag2DepLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(pnlPOSTypeT2D, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(btnConvertTag2Dep)) .addContainerGap(140, Short.MAX_VALUE))); tabConverter.addTab("Tagger to Dependency", pnlTag2Dep); javax.swing.GroupLayout pnlConverterLayout = new javax.swing.GroupLayout(pnlConverter); pnlConverter.setLayout(pnlConverterLayout); pnlConverterLayout.setHorizontalGroup(pnlConverterLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(pnlConverterLayout .createSequentialGroup().addContainerGap().addComponent(tabConverter).addContainerGap())); pnlConverterLayout.setVerticalGroup(pnlConverterLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(pnlConverterLayout .createSequentialGroup().addContainerGap().addComponent(tabConverter).addContainerGap())); jTabbedPane1.addTab("Converter", pnlConverter); lblTrainFile.setText("Train File:"); txtTrainFile.setEditable(false); btnBrowseTrainFile.setText("..."); btnBrowseTrainFile.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnBrowseTrainFileActionPerformed(evt); } }); lblTrainModelPath.setText("Model Path:"); txtTrainModelPath.setEditable(false); btnBrowseTrainModelPath.setText("..."); btnBrowseTrainModelPath.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnBrowseTrainModelPathActionPerformed(evt); } }); lblMaxIters.setText("Maximum Iterations:"); btnStartTraining.setText("Start Training"); btnStartTraining.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnStartTrainingActionPerformed(evt); } }); txtTrainLog.setColumns(20); txtTrainLog.setRows(5); jScrollbar2.setViewportView(txtTrainLog); javax.swing.GroupLayout pnlTrainLayout = new javax.swing.GroupLayout(pnlTrain); pnlTrain.setLayout(pnlTrainLayout); pnlTrainLayout.setHorizontalGroup(pnlTrainLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(pnlTrainLayout.createSequentialGroup().addContainerGap() .addGroup(pnlTrainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollbar2) .addGroup(pnlTrainLayout.createSequentialGroup() .addGroup(pnlTrainLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(lblTrainFile).addComponent(lblTrainModelPath)) .addGap(18, 18, 18) .addGroup(pnlTrainLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(txtTrainFile).addComponent(txtTrainModelPath)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(pnlTrainLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(btnBrowseTrainModelPath, javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE) .addComponent(btnBrowseTrainFile, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(pnlTrainLayout.createSequentialGroup().addComponent(lblMaxIters) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(spMaxIters, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 373, Short.MAX_VALUE) .addComponent(btnStartTraining))) .addContainerGap())); pnlTrainLayout.setVerticalGroup(pnlTrainLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(pnlTrainLayout.createSequentialGroup().addContainerGap().addGroup(pnlTrainLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(lblTrainFile) .addComponent(txtTrainFile, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(btnBrowseTrainFile)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(pnlTrainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lblTrainModelPath) .addComponent(txtTrainModelPath, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(btnBrowseTrainModelPath)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(pnlTrainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lblMaxIters) .addComponent(spMaxIters, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(btnStartTraining)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollbar2, javax.swing.GroupLayout.DEFAULT_SIZE, 262, Short.MAX_VALUE) .addContainerGap())); jTabbedPane1.addTab("Train", pnlTrain); lblInputFile.setText("Input File:"); txtInputFile.setEditable(false); btnBrowseInputFile.setText("..."); btnBrowseInputFile.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnBrowseInputFileActionPerformed(evt); } }); lblOutputPath.setText("Output Path:"); txtOutputPath.setEditable(false); btnBrowseOutputPath.setText("..."); btnBrowseOutputPath.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnBrowseOutputPathActionPerformed(evt); } }); chkGoldFile.setSelected(true); chkGoldFile.setText("Gold File:"); txtGoldFile.setEditable(false); btnBrowseGoldFile.setText("..."); btnBrowseGoldFile.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnBrowseGoldFileActionPerformed(evt); } }); txtTagLog.setColumns(20); txtTagLog.setEditable(false); txtTagLog.setRows(5); jScrollPane1.setViewportView(txtTagLog); javax.swing.GroupLayout pnlTagLogLayout = new javax.swing.GroupLayout(pnlTagLog); pnlTagLog.setLayout(pnlTagLogLayout); pnlTagLogLayout .setHorizontalGroup(pnlTagLogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 664, Short.MAX_VALUE)); pnlTagLogLayout .setVerticalGroup(pnlTagLogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 181, Short.MAX_VALUE)); tabTag.addTab("Log", pnlTagLog); lblTagEvaluation.setText("Total: 0 - Correct: 0 - Accuracy: 0%"); lstWordsList.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { lst_mouseClick(evt); } }); lstWordsList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent evt) { lstWoldsList_valueChanged(evt); } }); jScrollPane2.setViewportView(lstWordsList); lblWordsList.setText("Words List"); lstPredictedTags.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { lst_mouseClick(evt); } }); lstPredictedTags.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent evt) { lstPredictedTags_valueChanged(evt); } }); jScrollPane3.setViewportView(lstPredictedTags); lstGoldTags.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { lst_mouseClick(evt); } }); lstGoldTags.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent evt) { lstGoldTags_valueChanged(evt); } }); jScrollPane4.setViewportView(lstGoldTags); lblPredictedTags.setText("Predicted Tags"); lblGoldTags.setText("Gold Tags"); javax.swing.GroupLayout pnlTagResultsLayout = new javax.swing.GroupLayout(pnlTagResults); pnlTagResults.setLayout(pnlTagResultsLayout); pnlTagResultsLayout.setHorizontalGroup(pnlTagResultsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(pnlTagResultsLayout.createSequentialGroup().addContainerGap().addGroup(pnlTagResultsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlTagResultsLayout .createSequentialGroup() .addGroup(pnlTagResultsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(lblWordsList).addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 244, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(pnlTagResultsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(lblPredictedTags).addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 203, Short.MAX_VALUE)) .addGap(7, 7, 7) .addGroup(pnlTagResultsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lblGoldTags))) .addComponent(lblTagEvaluation, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap())); pnlTagResultsLayout.setVerticalGroup(pnlTagResultsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlTagResultsLayout.createSequentialGroup() .addContainerGap() .addGroup( pnlTagResultsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lblWordsList).addComponent(lblPredictedTags) .addComponent(lblGoldTags)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(pnlTagResultsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 119, Short.MAX_VALUE) .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(lblTagEvaluation).addContainerGap())); tabTag.addTab("Results", pnlTagResults); btnStartTagging.setText("Start Tagging"); btnStartTagging.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnStartTaggingActionPerformed(evt); } }); lblModelPath.setText("Model Path:"); txtModelPath.setEditable(false); btnBrowseModelPath.setText("..."); btnBrowseModelPath.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnBrowseModelPathActionPerformed(evt); } }); javax.swing.GroupLayout pnlTagLayout = new javax.swing.GroupLayout(pnlTag); pnlTag.setLayout(pnlTagLayout); pnlTagLayout.setHorizontalGroup(pnlTagLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(pnlTagLayout.createSequentialGroup().addContainerGap() .addGroup(pnlTagLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlTagLayout.createSequentialGroup().addGap(0, 0, Short.MAX_VALUE) .addComponent(btnStartTagging)) .addComponent(tabTag) .addGroup(pnlTagLayout.createSequentialGroup() .addGroup(pnlTagLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(lblInputFile).addComponent(lblOutputPath) .addComponent(chkGoldFile).addComponent(lblModelPath)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(pnlTagLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(txtGoldFile).addComponent(txtOutputPath) .addComponent(txtInputFile).addComponent(txtModelPath)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(pnlTagLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(btnBrowseModelPath, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) .addComponent(btnBrowseGoldFile, javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE) .addComponent(btnBrowseOutputPath, javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE) .addComponent(btnBrowseInputFile, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addContainerGap())); pnlTagLayout .setVerticalGroup(pnlTagLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(pnlTagLayout.createSequentialGroup().addContainerGap() .addGroup(pnlTagLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(pnlTagLayout.createSequentialGroup().addGroup(pnlTagLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lblModelPath) .addComponent(txtModelPath, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(4, 4, 4)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlTagLayout .createSequentialGroup().addComponent(btnBrowseModelPath) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED))) .addGroup( pnlTagLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lblInputFile) .addComponent(txtInputFile, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(btnBrowseInputFile)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( pnlTagLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lblOutputPath) .addComponent(txtOutputPath, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(btnBrowseOutputPath)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( pnlTagLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(chkGoldFile) .addComponent(txtGoldFile, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(btnBrowseGoldFile)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnStartTagging) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(tabTag).addContainerGap())); jTabbedPane1.addTab("Tag", pnlTag); pnlAbout.addComponentListener(new java.awt.event.ComponentAdapter() { public void componentShown(java.awt.event.ComponentEvent evt) { pnlAbout_Shown(evt); } }); lblMXPostTitle.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N lblMXPostTitle.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); lblMXPostTitle.setText("MXPost (Version 1.0)"); lblMXPostSiteTitle.setText("Site:"); lblMXPostSiteValue.setEditable(false); lblMXPostSiteValue.setForeground(new java.awt.Color(0, 102, 204)); lblMXPostSiteValue.setText("http://www.inf.ed.ac.uk/resources/nlp/local_doc/MXPOST.html"); lblMXPostSiteValue.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); lblMXPostSiteValue.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); lblMXPostAuthorsTitle.setText("Authors:"); lblMXPostAuthorsValue.setEditable(false); lblMXPostAuthorsValue.setText("Adwait Ratnaparkhi"); lblMXPostAuthorsValue.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); lblMXPostCitationTitle.setText("Citation:"); txtMXPostCitationValue.setColumns(20); txtMXPostCitationValue.setEditable(false); txtMXPostCitationValue.setLineWrap(true); txtMXPostCitationValue.setRows(5); txtMXPostCitationValue.setText( "A. Ratnaparkhi, \"A maximum entropy model for part-of-speech tagging\", in Proceedings of the Empirical Methods in Natural Language Processing Conference, University of Pennsylvania, pp. 133-142, 1996."); jScrollPane9.setViewportView(txtMXPostCitationValue); lblMXpostLicenseTitle.setText("License"); txtMXPostLicenseValue.setColumns(20); txtMXPostLicenseValue.setEditable(false); txtMXPostLicenseValue.setRows(5); txtMXPostLicenseValue.setText( " SOFTWARE LICENSE\n\n MXPOST and MXTERMINATOR\n\n All rights reserved.\n\n (c) 1997 Adwait Ratnaparkhi\n\n Developed by Adwait Ratnaparkhi\n University of Pennsylvania\n Dept. of Computer and Information Science\n 200 South 33rd Street\n Philadelphia, PA. 19104\n\n LICENSE INFORMATION\n\n Adwait Ratnaparkhi (\"Owner\") grants to the individual researcher who\n downloads this software (\"Licensee\") a non-exclusive, non-transferable\n run-time license to use the MXPOST and MXTERMINATOR software\n (\"Software\"), subject to the restrictions listed below under \"Scope of\n Grant.\"\n\n SCOPE OF GRANT\n\n The Licensee may:\n * use the Software for educational or research purposes;\n * permit others under the Licensee's supervision at the same site to\n use the Software for educational or research purposes;\n * copy the Software for archival purposes, provided that any such\n copy contains all of the original proprietary notices.\n\n The Licensee may not:\n * use the Software for commercial purposes;\n * allow any individual who is not under the direct supervision of\n the Licensee to use the Software;\n * redistribute the Software;\n * copy the Software other than as specified above;\n * rent, lease, grant a security interest in, or otherwise transfer\n rights to the Software;\n * remove any proprietary notices or labels accompanying the\n Software;\n\n DISCLAIMER\n\n The Owner makes no representations or warranties about the suitability\n of the Software and Linguistic Resources, either express or implied,\n including but not limited to the implied warranties of\n merchantability, fitness for a particular purpose, or\n non-infringement. The Owner shall not be liable for any damages\n suffered by Licensee as a result of using, modifying or distributing\n the Software or its derivatives.\n\n CONSENT\n\n By downloading, using or copying the Software, Licensee agrees to\n abide by the intellectual property laws, and all other applicable laws\n of the U.S., and the terms of this License. Ownership of the Software\n shall remain solely with the Owner.\n\n TERMINATION\n\n The Owner shall have the right to terminate this license at any time\n by written notice. Licensee shall be liable for any infringement or\n damages resulting from Licensee's failure to abide by the terms of\n this License."); jScrollPane5.setViewportView(txtMXPostLicenseValue); javax.swing.GroupLayout pnlAboutLayout = new javax.swing.GroupLayout(pnlAbout); pnlAbout.setLayout(pnlAboutLayout); pnlAboutLayout.setHorizontalGroup(pnlAboutLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlAboutLayout.createSequentialGroup() .addContainerGap() .addGroup(pnlAboutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(lblMXPostTitle, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, pnlAboutLayout .createSequentialGroup() .addGroup(pnlAboutLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(lblMXpostLicenseTitle) .addComponent(lblMXPostCitationTitle)) .addGap(11, 11, 11) .addGroup(pnlAboutLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane9).addComponent(jScrollPane5))) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, pnlAboutLayout .createSequentialGroup() .addGroup(pnlAboutLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(lblMXPostAuthorsTitle) .addComponent(lblMXPostSiteTitle)) .addGap(10, 10, 10) .addGroup(pnlAboutLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(lblMXPostSiteValue, javax.swing.GroupLayout.DEFAULT_SIZE, 617, Short.MAX_VALUE) .addComponent(lblMXPostAuthorsValue)))) .addContainerGap())); pnlAboutLayout.setVerticalGroup(pnlAboutLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(pnlAboutLayout.createSequentialGroup().addContainerGap().addComponent(lblMXPostTitle) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(pnlAboutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lblMXPostSiteTitle).addComponent(lblMXPostSiteValue, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(pnlAboutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lblMXPostAuthorsTitle).addComponent(lblMXPostAuthorsValue, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(pnlAboutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(pnlAboutLayout.createSequentialGroup() .addComponent(lblMXPostCitationTitle).addGap(0, 91, Short.MAX_VALUE)) .addGroup(pnlAboutLayout.createSequentialGroup() .addComponent(jScrollPane9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 9, Short.MAX_VALUE))) .addGroup(pnlAboutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(pnlAboutLayout.createSequentialGroup().addComponent(lblMXpostLicenseTitle) .addGap(0, 0, Short.MAX_VALUE)) .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 155, Short.MAX_VALUE)) .addContainerGap())); jTabbedPane1.addTab("About", pnlAbout); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jTabbedPane1)); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jTabbedPane1)); pack(); }
From source file:com.pianobakery.complsa.LicenseKeyGUI.java
/** * Following "Generated Code" is generated by Netbeans form editor. *//* w w w .j ava2 s . c o m*/ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); licenseExpirationDatejTextField = new javax.swing.JTextField(); licenseStatusjTextField = new javax.swing.JTextField(); closejButton = new javax.swing.JButton(); jPanel2 = new javax.swing.JPanel(); jLabel4 = new javax.swing.JLabel(); namejTextField = new javax.swing.JTextField(); jLabel5 = new javax.swing.JLabel(); emailjTextField = new javax.swing.JTextField(); companyjTextField = new javax.swing.JTextField(); jLabel6 = new javax.swing.JLabel(); changeProductKeyjButton = new javax.swing.JButton(); activatejButton = new javax.swing.JButton(); useTrialButton = new javax.swing.JButton(); buyButton = new javax.swing.JButton(); progressjLabel = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("Licensing"); jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Product License Information")); jLabel1.setText("License Status:"); jLabel2.setText("License Expiration Date:"); licenseExpirationDatejTextField.setEditable(false); licenseStatusjTextField.setEditable(false); 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(20, 20, 20) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel2).addComponent(jLabel1)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(licenseExpirationDatejTextField) .addComponent(licenseStatusjTextField)) .addContainerGap())); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel1) .addComponent(licenseStatusjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2).addComponent(licenseExpirationDatejTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap())); closejButton.setText("Close"); closejButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { closejButtonActionPerformed(evt); } }); jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Product is Licensed to")); jLabel4.setText("Name:"); namejTextField.setEditable(false); jLabel5.setText("e-mail:"); emailjTextField.setEditable(false); companyjTextField.setEditable(false); jLabel6.setText("Company:"); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup(jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup() .addGap(87, 87, 87) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel5, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel6, javax.swing.GroupLayout.Alignment.TRAILING)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(namejTextField, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(emailjTextField, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(companyjTextField, javax.swing.GroupLayout.Alignment.TRAILING)) .addContainerGap())); jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup().addContainerGap() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel4).addComponent(namejTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel5).addComponent(emailjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel6).addComponent(companyjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap())); changeProductKeyjButton.setText("Change Product Key"); changeProductKeyjButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { changeProductKeyjButtonActionPerformed(evt); } }); useTrialButton.setText("Use 30 Day Trial"); useTrialButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { useTrialKeyButtonActionPerformed(e); } }); buyButton.setText("Buy License"); buyButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { buyButtonActionPerformed(e); } }); activatejButton.setText("Activate"); activatejButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { activatejButtonActionPerformed(evt); } }); progressjLabel.setForeground(Color.red); progressjLabel.setText(" "); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(progressjLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 195, Short.MAX_VALUE) .addGap(18, 18, 18).addComponent(buyButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(useTrialButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(activatejButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(changeProductKeyjButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(closejButton)) .addComponent(jPanel2, 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.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(closejButton).addComponent(changeProductKeyjButton) .addComponent(activatejButton).addComponent(progressjLabel) .addComponent(useTrialButton).addComponent(buyButton)) .addContainerGap())); layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] { useTrialButton, activatejButton, changeProductKeyjButton, closejButton }); pack(); }