bDetails.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { formFocusGained(evt);
bDetails.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { formFocusGained(evt);
btnBrowse.addFocusListener(listener); cboxLocation.addItemListener(listener); tfClassToTest.getDocument().addDocumentListener(listener);
/** * Gets the Add button. */ private JButton getAddButton() { if (addButton == null) { addButton = getButtonFactory().createJButton("AddButton"); addButton.addFocusListener(new NodePickerEditListener()); } return addButton; }
getContentPane().setLayout(new BorderLayout()); JButton b = new JButton(); b.addFocusListener(new FocusListener() {
/** * Gets the Remove button. */ private JButton getRemoveButton() { if (removeButton == null) { removeButton = getButtonFactory().createJButton("RemoveButton"); removeButton.addFocusListener(new NodePickerEditListener()); } return removeButton; }
/** * Gets the Add button. */ private JButton getAddButton() { if (addButton == null) { addButton = getButtonFactory().createJButton("AddButton"); addButton.addFocusListener(new NodePickerEditListener()); } return addButton; }
/** * Gets the Remove button. */ private JButton getRemoveButton() { if (removeButton == null) { removeButton = getButtonFactory().createJButton("RemoveButton"); removeButton.addFocusListener(new NodePickerEditListener()); } return removeButton; }
private void setButtonDefaults(JButton but) { but.setBorderPainted(false); but.setBackground(Color.DARK_GRAY); but.setForeground(Color.WHITE); but.setName(but.getText().toLowerCase()); but.setPreferredSize(buttonSize); but.addActionListener(this); //add focus listener final Color clr = ContentPane.getBackground(); final int r = clr.getRed(); final int g = clr.getGreen(); final int b = clr.getBlue(); but.addFocusListener(new FocusListener() { @Override public void focusLost(FocusEvent e) { log("r = " + r + ", g = " + g + ", b = " + b); JButton button = (JButton) e.getSource(); button.setBackground(new Color(r, g, b)); } @Override public void focusGained(FocusEvent e) { JButton button = (JButton) e.getSource(); button.setBackground(new Color(r, g, b)); } }); }
this.addAbstractJButton.setToolTipText("Add Abstract"); this.addAbstractJButton.addActionListener(this); this.addAbstractJButton.addFocusListener(this); this.modifyAbstractJButton.setToolTipText("Modify Abstract"); this.modifyAbstractJButton.addActionListener(this); this.modifyAbstractJButton.addFocusListener(this); this.removeAbstractJButton.setToolTipText("Remove Abstract"); this.removeAbstractJButton.addActionListener(this); this.removeAbstractJButton.addFocusListener(this); this.addIpFilterJButton.setToolTipText("Add IP Filter"); this.addIpFilterJButton.addActionListener(this); this.addIpFilterJButton.addFocusListener(this); this.modifyIpFilterJButton.setToolTipText("Modify IP Filter"); this.modifyIpFilterJButton.addActionListener(this); this.modifyIpFilterJButton.addFocusListener(this); this.removeIpFilterJButton.setToolTipText("Remove IP Filter"); this.removeIpFilterJButton.addActionListener(this); this.removeIpFilterJButton.addFocusListener(this); this.addPermissionJButton.setToolTipText("Add Permission"); this.addPermissionJButton.addActionListener(this); this.addPermissionJButton.addFocusListener(this); this.modifyPermissionJButton.setToolTipText("Modify Permission");
days[index].addActionListener(this); days[index].addKeyListener(this); days[index].addFocusListener(this);
b1 = new JButton("Start");// The JButton name. b1.setRequestFocusEnabled(false); b1.addFocusListener(this); b1.setLocation(10, 12); panel.add(b1); b2.addFocusListener(this); b2.setLocation(70, 12); panel.add(b2);
this.btnDelete.addFocusListener(new FocusListener() { @Override public void focusLost(FocusEvent e) {
button.addFocusListener(this);
jColor.addFocusListener(listener); jColor.setActionCommand(TagsDialogAction.SHOW_COLOR.name()); jColor.addActionListener(listener); jOK.setActionCommand(TagsDialogAction.OK.name()); jOK.addActionListener(listener); jOK.addFocusListener(listener); jCancel.addFocusListener(listener);
bDetails.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { formFocusGained(evt);
viewButton.setRequestFocusEnabled(true); viewButton.requestFocus(); viewButton.addFocusListener(tlf);
getRootPane().setDefaultButton(mButtonOK); mButtonCancel.addFocusListener(new FocusAdapter()
} } ); button.addFocusListener(new FocusListener() { @Override public void focusGained(FocusEvent e) {
wwwLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); wwwLabel.setNextFocusableComponent(wikiLabel); wwwLabel.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { wwwLabelFocusGained(evt); wikiLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); wikiLabel.setNextFocusableComponent(downloadsLabel); wikiLabel.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { wikiLabelFocusGained(evt); downloadsLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); downloadsLabel.setNextFocusableComponent(dynamicContentPane); downloadsLabel.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { downloadsLabelFocusGained(evt); backToTopLabel.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { backToTopLabelFocusGained(evt);