Package javax.swing.text

Examples of javax.swing.text.JTextComponent.selectAll()


                    public void focusGained(FocusEvent e) {
                        // save unix system selection (middle mouse paste)
                        Clipboard sysSel = Toolkit.getDefaultToolkit().getSystemSelection();
                        if(sysSel != null) {
                            Transferable old = sysSel.getContents(null);
                            editorComponent.selectAll();
                            sysSel.setContents(old, null);
                        } else {
                            editorComponent.selectAll();
                        }
                    }
View Full Code Here


                        if(sysSel != null) {
                            Transferable old = sysSel.getContents(null);
                            editorComponent.selectAll();
                            sysSel.setContents(old, null);
                        } else {
                            editorComponent.selectAll();
                        }
                    }
                }
        );
    }
View Full Code Here

    SwingUtilities.invokeLater(new Runnable() {
      public void run() {
        final JTextComponent text = SelectAllAction.this
        .getTextComponent(evt);
        if (text != null) {
          text.selectAll();
          text.requestFocus();
        }
      }
    });
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.