private void copyButton_actionPerformed(ActionEvent e) {
   if (logger.isInfoEnabled()) {
     logger.info("copy button clicked");
   }
   debugTextArea.selectAll();
   debugTextArea.copy();
   debugTextArea.select(0, 0);
 }
 public static void lightboxCopia() {
   if (codigoGeradoLightbox.getText().equals("")) {
     JOptionPane.showMessageDialog(
         null, "O Código está vazio", "Vazio", JOptionPane.ERROR_MESSAGE);
   } else {
     codigoGeradoLightbox.selectAll();
     codigoGeradoLightbox.copy();
     JOptionPane.showMessageDialog(null, "Código copiado som sucesso");
   }
 }
  private void updateResult() {

    if (iResult == 0) {

      // in case 'help' has removed the grid
      if (bHelp) {
        pResult.removeAll();
        pResult.add(gScrollPane, BorderLayout.CENTER);
        pResult.doLayout();
        gResult.fireTableChanged(null);
        pResult.repaint();

        bHelp = false;
      }
    } else {
      showResultInText();
    }

    txtCommand.selectAll();
    txtCommand.requestFocus();
  }
  private void go() {
    JFrame frame = new JFrame();
    JPanel panel = new JPanel();
    panel.setBackground(Color.lightGray);

    JLabel label = new JLabel("Tell me something interesting.");

    JButton button = new JButton("Click it!");
    button.addActionListener(this);

    textArea = new JTextArea(10, 20);
    textArea.setText("Not all who are lost are wandering.");
    textArea.selectAll();

    panel.add(button);
    panel.add(textArea);

    frame.getContentPane().add(BorderLayout.NORTH, label);
    frame.getContentPane().add(BorderLayout.CENTER, panel);
    frame.getContentPane().add(BorderLayout.SOUTH, button);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setSize(400, 300);
    frame.setVisible(true);
  }
Example #5
0
 public void selectAllMenuAction(ActionEvent event) {
   if (sourceArea != null) {
     sourceArea.selectAll();
   }
 }
Example #6
0
 public static void appendInput(Message msg) {
   String musername = msg.getUsername();
   String chatmessage = msg.getMessage();
   show_areaS.append(musername + ": " + chatmessage + "\n");
   show_areaS.selectAll();
 }
Example #7
0
 void btnSelect_actionPerformed(ActionEvent e) {
   txtGeomView.selectAll();
   txtGeomView.copy();
 }
 void copyB_actionPerformed(ActionEvent e) {
   traceTextArea.selectAll();
   traceTextArea.copy();
   traceTextArea.setSelectionEnd(0);
 }