private JButton createNewRowButton() { final JButton newRowButton = new JButton(); newRowButton.setText("+"); newRowButton.addActionListener(e -> rootPanel.add(createArtifactRow("", "", "", ""))); return newRowButton; }
private JButton createRemoveRowButton(final JPanel panel) { final JButton removeRowButton = new JButton(); removeRowButton.setText("-"); removeRowButton.addActionListener(e -> { final int idx = getComponentIndex(panel); rootPanel.remove(panel); rows.remove(idx); }); return removeRowButton; }
bDetails = new javax.swing.JButton(); lStatus = new javax.swing.JLabel(); add(cbSelected, gridBagConstraints); bDetails.setText("Details"); bDetails.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { bDetailsActionPerformed(evt); lStatus.setText((desc.isUpdateAvailable() ? "Update available" : desc.getStatus().toString())); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
public MyButton(char c, String name, BundlesProbesTabUI listener, JPanel panel) { super.setText(name); super.setMnemonic(c); super.setMinimumSize(new Dimension(W, H)); super.setPreferredSize(new Dimension(W, H)); super.setMaximumSize(new Dimension(W, H)); super.addActionListener(listener); panel.add(this); } }
btnBlack = new javax.swing.JButton(); btnBlue = new javax.swing.JButton(); lblBlue = new javax.swing.JLabel(); lblGreen = new javax.swing.JLabel(); btnGreen = new javax.swing.JButton(); btnColorless = new javax.swing.JButton(); lblWhite = new javax.swing.JLabel(); lblBlack.setText("Black"); btnBlack.setText("0"); btnBlue.setText("0"); lblBlue.setText("Blue"); lblGreen.setText("Green"); btnGreen.setText("0"); btnColorless.setText("0"); lblColorless.setText("Colorless"); btnWhite.setText("0"); btnRed.setText("0");
public static void main(String args[]) { JFrame frame = new JFrame(); frame.setTitle("Title"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JButton button = new JButton(); button.setText("Hello, World!"); frame.getContentPane().add(button, BorderLayout.CENTER); frame.setSize(200, 100); frame.pack(); frame.setVisible(true); frame.show(); } }
button.setText("Success!"); } else { button.setText("Done. " + failures + " parses failed"); button.addActionListener(evt -> dialog.setVisible(false));
jPanel1.setLayout(new javax.swing.BoxLayout(jPanel1, javax.swing.BoxLayout.Y_AXIS)); jLabel2.setText("Type in the internet address of a document or web page."); jPanel1.add(jLabel2); urlTextField.addActionListener(evt -> urlTextFieldActionPerformed(evt)); jPanel3.add(urlTextField); jPanel1.add(jPanel3); openButton.setText("Open"); openButton.setEnabled(false); openButton.addActionListener(evt -> openButtonActionPerformed(evt)); jPanel2.add(openButton); cancelButton.setText("Cancel"); cancelButton.addActionListener(evt -> cancelButtonActionPerformed(evt)); jPanel2.add(cancelButton); browseButton.setText("Browse"); browseButton.addActionListener(evt -> browseButtonActionPerformed(evt)); jPanel2.add(browseButton);
bDetails = new javax.swing.JButton(); lStatus = new javax.swing.JLabel(); add(cbSelected, gridBagConstraints); bDetails.setText("Details"); bDetails.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { bDetailsActionPerformed(evt); lStatus.setText((desc.isUpdateAvailable() ? "Update available" : desc.getStatus().toString())); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
JButton okay = new javax.swing.JButton(); okay.setText("Okay"); okay.setToolTipText("Okay"); okay.addActionListener(evt -> dialog.setVisible(false)); JButton cancel = new javax.swing.JButton(); cancel.setText("Cancel"); cancel.setToolTipText("Cancel"); cancel.addActionListener(evt -> { fileList.clearSelection(); dialog.setVisible(false);
public void addUpdateJREButton (final String webLink, String unlocMessage) { btnInstallJava.setText(I18N.getLocaleString(unlocMessage)); btnInstallJava.addActionListener(new ActionListener() { @Override public void actionPerformed (ActionEvent arg0) { OSUtils.browse(webLink); } }); btnInstallJava.setBounds(345, 210, 150, 28); fitterPane.add(btnInstallJava); }
private void changeLocale() { statusLabel.setText(rb.getString("inactive")); configUpdateButton.setText(rb.getString("check.for.updates")); configUpdateLabel.setText(rb.getString("current.version") + ": " + UpdateUtils.getThisJarVersion()); configThreadsLabel.setText(rb.getString("max.download.threads")); configTimeoutLabel.setText(rb.getString("timeout.mill")); configRetriesLabel.setText(rb.getString("retry.download.count")); configOverwriteCheckbox.setText(rb.getString("overwrite.existing.files")); configAutoupdateCheckbox.setText(rb.getString("auto.update")); configPlaySound.setText(rb.getString("sound.when.rip.completes")); configShowPopup.setText(rb.getString("notification.when.rip.starts")); configSaveOrderCheckbox.setText(rb.getString("preserve.order")); configSaveLogs.setText(rb.getString("save.logs")); configSaveURLsOnly.setText(rb.getString("save.urls.only")); configSaveAlbumTitles.setText(rb.getString("save.album.titles")); configClipboardAutorip.setText(rb.getString("autorip.from.clipboard")); configSaveDescriptions.setText(rb.getString("save.descriptions")); configUrlFileChooserButton.setText(rb.getString("download.url.list")); configSaveDirButton.setText(rb.getString("select.save.dir") + "..."); configPreferMp4.setText(rb.getString("prefer.mp4.over.gif")); configWindowPosition.setText(rb.getString("restore.window.position")); configURLHistoryCheckbox.setText(rb.getString("remember.url.history")); optionLog.setText(rb.getString("Log")); optionHistory.setText(rb.getString("History")); optionQueue.setText(rb.getString("Queue")); optionConfiguration.setText(rb.getString("Configuration")); }
File f = rsc.dir; String prettyFile = Utils.shortenPath(f); openButton.setText("Open " + prettyFile); mainFrame.setTitle("RipMe v" + UpdateUtils.getThisJarVersion()); try { openButton.addActionListener(event -> { try { Desktop.getDesktop().open(new File(event.getActionCommand()));
appliedEffectsPanel.add(this, constrains); JPanel titlePanel = new JPanel(); titlePanel.setLayout(new LayoutManager() { public void removeLayoutComponent (Component comp) { upButton = new JButton(); titlePanel.add(upButton); upButton.setText("Up"); upButton.setMargin(new Insets(0, 0, 0, 0)); Font font = upButton.getFont(); downButton = new JButton(); titlePanel.add(downButton); downButton.setText("Down"); downButton.setMargin(new Insets(0, 0, 0, 0)); Font font = downButton.getFont(); deleteButton = new JButton(); titlePanel.add(deleteButton); deleteButton.setText("X"); deleteButton.setMargin(new Insets(0, 0, 0, 0)); Font font = deleteButton.getFont(); upButton.addActionListener(new ActionListener() { public void actionPerformed (ActionEvent evt) { int currentIndex = effectPanels.indexOf(EffectPanel.this);
btnNo = new javax.swing.JButton(); btnYes = new javax.swing.JButton(); lblQuestion.setText("question"); btnNo.setText("No"); btnNo.addActionListener(evt -> btnNoActionPerformed(evt)); btnYes.setText("Yes"); btnYes.addActionListener(evt -> btnYesActionPerformed(evt));
JButton cancel = new javax.swing.JButton(); new SaveOutputThread(filename, progress, dialog, cancel, sentences); cancel.setText("Cancel"); cancel.setToolTipText("Cancel"); cancel.addActionListener(evt -> thread.cancelled = true);