Is command+hold for selecting multiple text gone?

I recently updated to a laptop with os x version 10.9.5. On my previous laptop I could select multiple, non-consecutive words by holding down the command key, which was extremely useful when re-arranging my notes or creating study guides for myself. However, on my new laptop I can't get this feature to work, and I'm wondering if anyone knows whether it's been disabled in the newer version of pages or if there's a different shortcut now?
Thank you for any feedback.

All Pages v5 versions cannot select non-consecutive words. This capability exists in Pages ’09, which is the more functional, and feature-laden word processor.

Similar Messages

  • How do I select multiple text in Pages

    I'm using the newest version of pages.
    In MS office WORD, I can hold the Ctrl key and with multiple klick in the text I can select multiple text.
    Does pages has the similar function?

    Not possible in Pages 5.2.2, this has been removed by Apple along with 110 features.
    In Pages '09 you hold down the command key, the exact same equivalent as in Word for Windows.
    Peter

  • Cannot select multiple text items simultaneously

    Since upgrading to the latest Pages, I can no longer select multiple letters/words by holding down command. I used to use this to edit multiple things (titles, for example) all at once (make bold, underlined, italicized, larger font, coloured, etc.). Now, however, I have to select each letter/word one at a time and edit them individually.
    Is this just a bug or is there a new way of selecting multiple text characters simultaneously for editing?
    Thanks!

    There is no fix by any means.
    Switching from Word to Pages v5 (any release) is like giving up oxygen for a vacuum. The time that you will expend searching for feature/functionality omissions in Pages v5 that you had in MS Word will just suck the life out of you.

  • Using the CTRL button to select multiple text segments in Design Editor

    Hi there,
    This may be a fairly elementary question, however I'm very new to RoboHelp.
    I'm currently building an online help text system, and when formatting my html files in Design Editor, I have to apply styles one at a time. I was hoping RoboHelp would have a function identical to Microsoft Word whereby holding down the CTRL key would allow you to select various segments in the file and apply the style. Eg. selecting only text you want to apply Heading 3 to.
    If RoboHelp does not have this functionality, this project will take me in the vicinity of 7 years to complete. Thanks for your time.
    Regards,
    PK

    No it doesn't work that way. What you need to do is create some character styles in your style sheet and apply those.
    Paragraph styles are defined something like
    P {
        font-size: 10pt;
        margin-top: 0pt;
        margin-bottom: 6pt;
        font-family: Verdana, sans-serif;
        color: #000000;
        font-weight: normal;
    P.Normal-Indent {
        margin-left: 20pt;
    where the second P definition will inherit all that is in P plus add the indent.
    When you select those styles, they will be applied to the whole paragraph.
    You can also create characters classes. If you do it within RoboHelp, RH will write the CSS code for you. If you edit the CSS outside RH, then instead of writing P or some other tag, you would normally start with the full stop so you might have
    .code {
        font-size: xx-small;
        font-family: Courier;
    to apply the Courier font to a selection in any paragraph style.
    In RoboHelp you need to prefix the character code with "span" to make it display in the dropdown, thus you would need:
    span.code {
        font-size: xx-small;
        font-family: Courier;
    See www.grainge.org for RoboHelp and Authoring tips

  • I am attempting to upload multiple photos on a macpro from a cd.  I am used to a pc.  I tried using the command button to select multiples but it does not work.  Please advise

    I am attempting to upload multiple photos on a mac pro from a cd.  I have tried holding the "command"button down to select multiple photos but it does not work.  Please advise.  Thanks,John

    why not sort by (name, date, etc) and Click on 1st and Shift-Click on last.
    Might work better to copy or import to a project folder.
    https://discussions.apple.com/community/ilife/iphoto
    http://www.apple.com/support/iphoto

  • Select Multiple Text Areas

    How can you select multiple (but separate) lines of text? In
    most other programs shift lets you select from one point to
    another, and control lets you pick different points within the text
    body. Is dreamweaver capable of this?

    Matt,
    > How can you select multiple (but separate) lines of
    text? In most other
    > programs shift lets you select from one point to
    another, and control lets you
    > pick different points within the text body. Is
    dreamweaver capable of this?
    DW only allows discontiguous selections for table cells and
    position:absolute elements.
    HTH,
    Randy

  • Setting Font for converting multiple text files into PDF using VB 6.0

    Dear All,
    Am converting multiple text files into PDF using VB6.0. Currently, am unable to control the font face and size for the generated files. Below is the procedure am using for each file;
    Public Sub proc_convert_to_PDF(srcFilename As String, destFilename As String)
    Dim p_AcroApp As CAcroApp
    Dim p_VDoc As CAcroAVDoc
    Dim p_DDoc As CAcroPDDoc
    Dim IsOk As Boolean
    Set p_AcroApp = CreateObject("AcroExch.App")
    Set p_VDoc = CreateObject("AcroExch.AVDoc")
    Call p_VDoc.Open(srcFilename, "")
    Set p_VDoc = p_AcroApp.GetActiveDoc
    If p_VDoc.IsValid Then
    Set p_DDoc = p_VDoc.GetPDDoc
    ' Fill in pdf properties.
    p_DDoc.SetInfo "Title", Format(Date, "dd-mm-yyy")
    p_DDoc.SetInfo "Subject", srcFilename
    If p_DDoc.Save(1 Or 4 Or 32, destFilename) <> True Then
    MsgBox "Failed to save " & srcFilename
    End If
    p_DDoc.Close
    End If
    'Close the PDF
    p_VDoc.Close True
    p_AcroApp.Exit
    'Clear Variables
    Set p_DDoc = Nothing
    Set p_VDoc = Nothing
    Set p_AcroApp = Nothing
    End Sub
    What I need;
    1) to be able to set the font face of the destination file ( destFilename)
    2) to be able to set the font size of the destination file ( destFilename)
    Am using Adobe Acrobat 7.0 Type Library
    Kindly Help.
    Thanks in advance

    We didn't say it doesn't work. We said it isn't supported.
    There are a number of other ways to make a PDF. The one which would
    give the most control is if your application directly printed to GDI,
    controlling the font directly. This could print to Adobe PDF.
    You could look for an application that gives control of font for
    printing.
    You could use a text-to-PostScript system and distill the result. You
    could even look for a non-Adobe text-to-PDF.
    Working in the unsupported and dangerous world you chose, the font
    size for text conversion is set (and this is very bad design from
    Adobe) in the settings for Create PDF > From Web Page. There is no API
    to this.
    Aandi Inston

  • An easy way for selecting multiple messages/contac...

    is there any other way for marking multiple messages in Nokia 5230 rather than tapping a message----> tapping option---> then mark/ unmark ----> and finally mark... please help me
    Solved!
    Go to Solution.

    This feature is missing on most Nokia models now a days.. Either you select ONE at a time or ALL at a time.. No option to select a few as you want..
    Have a look at the PENCIL KEY application if it serves your purpose.. Google for it..
    --------------------------------------------------​--------------------------------------------------------​--------------------------------------------------​--If you find this helpful, pl. hit the White Star in Green Box...

  • Lost functionality for selecting multiple photos?

    In iOS previous to 5 I could go into my imported photos, choose select, then tap, hold and drag my finger across multiple photos to select a whole page very quickly. This functionality seems to be gone in iOS 5 and each individual photo needs to be tapped -- one by one. This is a serious step back for those who import many photos from their camaras and then want to clean out the imported photos quickly. Can anyone confirm this functionality is still there and perhaps I am not seeing how to do it?

    I don't whether it was possible prior to iOS 5 (I'm not aware that it was), but I don't appear to be able to do it in iOS 5

  • CS3, VBS, Selecting multiple text frames in a region is very slow

    Hello,
    I'm writing a script that selects a large crossword grid (19cm x 19cm), and changes the font and alignment before exporting out as an eps.
    When I run the code below, it starts off selecting the frames quickly and then gradually slows to a crawl, before being painfully slow at the end. It takes 35mins to run it on the clues grid and then the solution grid.
    Can anyone think of a way to rewrite the code so it's quicker? Or are there some settings that could be changed so it handles better? I've changed the Display Performance settings to the bare minimum, but it only has a little effect.
    Thanks for any help ... Nigel
    rem Selects grid and fixes text
    Set mySolPage = myDocumentA.Pages.Item(2)
    For myCounter = 1 to mySolPage.TextFrames.Count
    Set myTextFrame = mySolPage.TextFrames(myCounter)
    myBounds = myTextFrame.GeometricBounds
    If myBounds(0) > 35 and myBounds(1) > 5 and myBounds(2) < 240 and myBounds(3) < 210 Then
    myTextFrame.select(idSelectionOptions.idaddTo)
    myTextFrame.Texts.Item(1).AppliedFont = "Tahoma"
    myTextFrame.Texts.Item(1).fontstyle = "Bold"
    myTextFrame.Texts.Item(1).baselineShift = 0
    myTextFrame.textFramePreferences.VerticalJustification = idVerticalJustification.idCenterAlign
    myTextFrame.textFramePreferences.ignoreWrap = 1
    myTextFrame.textFramePreferences.firstBaselineOffset = idFirstBaseline.idAscentOffset
    else
    myTextFrame.select(idSelectionOptions.idremoveFrom)
    End If
    Next

    hi Nigel,
    1) move your TextFrames to separate layer - then you don't need to check Bounds
    2) turn OFF redrawing:
    Property EnableRedraw As Boolean
    Member of InDesign.ScriptPreference
    If true, enables redraw during script execution.
    3) create and use Para or Char Style - then you don't need to apply many times same params
    myTextFrame.ParentStory.Texts.Item(1).AppliedParagraphStyle = myParaStyle
    or
    call myTextFrame.ParentStory.Texts.Item(1).ApplyParagraphStyle(myParaStyle,True)
    and why you have:
    else
    myTextFrame.select(idSelectionOptions.idremoveFrom)
    there is no Select command ...
    but if you have Select command somewhere before - you can iterate .Selection collection - so you don't need to check bounds
    robin
    www.adobescripts.com

  • SQL statement for selecting multiple partitions

    Hi All,
    May i know how to Select data from a table having multiple partitions ?
    Example : Owner = Scott, Table= Emp, Partitions (P1,P2,P3,P4,P5)
    Thanks

    no...
    SQL>
      1  create table partition_test
      2  (owner, object_name, object_id)
      3  partition by list(owner)
      4  (partition part_1 values ('SYS'),
      5   partition part_2 values ('SYSTEM'),
      6   partition part_3 values ('OUTLN')
      7  ) as select owner, object_name, object_id from all_objects
      8* where owner in ('SYS', 'SYSTEM', 'OUTLN')
      9  /
    Table created.
    SQL> select count(*) from partition_test partition(part_1, part_2);
    select count(*) from partition_test partition(part_1, part_2)
    ERROR at line 1:
    ORA-00933: SQL command not properly ended
    SQL> select count(*) from partition_test partitions(part_1, part_2);
    select count(*) from partition_test partitions(part_1, part_2)
    ERROR at line 1:
    ORA-00933: SQL command not properly ended
    SQL> select count(*) from partition_test partitions(part_1 + part_2);
    select count(*) from partition_test partitions(part_1 + part_2)
    ERROR at line 1:
    ORA-00933: SQL command not properly ended
    SQL> select count(*) from partition_test partitions(part_1 between part_2
    select count(*) from partition_test partitions(part_1 between part_2)
    ERROR at line 1:
    ORA-00933: SQL command not properly ended
    SQL> select count(*) from partition_test partitions("part_1 part_2");
    select count(*) from partition_test partitions("part_1 part_2")
    ERROR at line 1:
    ORA-00933: SQL command not properly endedand this is the documented behavior:
    "partition_extension_clause
    For PARTITION or SUBPARTITION, specify the name or key value of the partition or subpartition within table from which you want to retrieve data.
    For range- and list-partitioned data, as an alternative to this clause, you can specify a condition in the WHERE clause that restricts the retrieval to one or more partitions of table. Oracle Database will interpret the condition and fetch data from only those partitions. It is not possible to formulate such a WHERE condition for hash-partitioned data."
    from:
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_10002.htm#i2076542
    Amiel

  • Shortcut for selecting multiple files within folders

    I'm archiving a load of work on to CD and deleting the files off of my server but keeping the folders on there for reference.
    Currently, I am having to SHIFT + click / COMMAND + click &drag to select these files and it is taking me forever.
    Is there a keyboard shortcut that allows me to select all files within folders rather than just a select all which will select the folders aswell?

    I would switch to list view, then click on the "Kind" column which will group the folders together.  Now you can click and drag to select a large range of files, excluding the folders, or you can click on the first file, the Shift click on the last file to select a large range of files.  At most you would need to do this twice.  Once for files listed above folders, and once for files listed below folders.
    If you want to use the Terminal, there are powerful Unix commands that can do this, however, that same power when misused can wipe out your disk :-)

  • DropDownByKey - support for selecting multiple items?

    Hello
    Is there a simple way to allow a selection of multiple items (zero or more) when using a dropdown ui element?
    Thanks in advance
    Rob

    Please read the Javadoc:
    * Web Dynpro AbstractDropDownByIndex API.
    * Abstract base class of drop-down list classes with index based context binding.
    * Represents a one-from-many selection visualized by a text field, a button and a drop-down list.
    * The selected value is displayed in the text field, the list of all selectable values is displayed
    * in the drop-down list which appears when the button is pressed.
    * <p>
    * <strong>Data binding:</strong>
    * <br>
    * The displayed texts and the selection are retrieved from a context.
    * The context must provide a node <code>X</code> with <code>X.cardinality = 0..n</code> with an attribute
    * <code>y</code> of type <code>String</code>.
    * The selectable values are the values of attribute <code>y</code> of the node elements.
    * The selected value is determined by the lead selection of node <code>X</code>.
    * <p>
    * The property <code>texts</code> must be bound to the attribute <code>y</code>.
    * <p>This type can be called by applications using Web Dynpro, but DO NOT EXTEND OR IMPLEMENT IT!</p>
    * @author SAP
    * @SAPWebDynproPart 2
    A one-from-many selection control will by definition never allow a multiple selection.

  • Selecting multiple text layers bug

    I have found this post from April where the bug was acknowledged in the beta: http://forums.adobe.com/message/4306413#4306413.
    I now have the official release of CS6, and I am still seeing this issue. And for clarification, here's what the issue is:
    - I start off creating a text layer with a font size of 20px.
    - I then transform this layer to make it larger.
    - I copy the layer over so I have identical text layers.
    - When I select each individually, I am shown the new, larger font size, we'll just say 40px. But when I select both together, it shows the original font size of 20px in the character palette. When I increase the font size with both selected to say 30px, it actually makes the text more like 60px.
    Will this bug actually get fixed?
    Thanks for any insight you can give.
    And for more info, I am running CS6 off of OSX Lion.

    I was going to suggest a script, but it seems that there are major bugs in the javascript DOM.
    It will only set the size if the text has not been transformed and then is not acurate (+- .5), this is a bug.
    If the text has been transformed the new text size has to be divided by the transform factor, this is a bug.
    Tested with Windows 7 and Photoshop CS6 version 13.0.1 so don't know what state other versions are in.
    This script will work for the above version and O.S.
    N.B. if Photoshop gets the bugs fixed this script will no longer work correctly!
    #target photoshop
    app.bringToFront();
    if(documents.length) app.activeDocument.suspendHistory('Set Font Size', 'main()');
    function main(){
    var win = new Window('dialog','Set Font Size');
    g = win.graphics;
    var myBrush = g.newBrush(g.BrushType.SOLID_COLOR, [0.99, 0.99, 0.99, 1]);
    g.backgroundColor = myBrush;
    win.p1= win.add("panel", undefined, undefined, {borderStyle:"black"});
    win.g1 = win.p1.add('group');
    win.g1.orientation = "row";
    win.title = win.g1.add('statictext',undefined,'Set Font Size');
    win.title.alignment="fill";
    var g = win.title.graphics;
    g.font = ScriptUI.newFont("Georgia","BOLDITALIC",22);
    win.g5 =win.p1.add('group');
    win.g5.orientation = "row";
    win.g5.alignment='left';
    win.g5.rb1 = win.g5.add('radiobutton',undefined,'All text layers');
    win.g5.rb2 = win.g5.add('radiobutton',undefined,'Selected text layers');
    win.g5.rb1.value=true;
    win.g10 =win.p1.add('group');
    win.g10.orientation = "row";
    win.g10.alignment='left';
    win.g10.st1 = win.g10.add('statictext',undefined,'Please enter text size..');
    win.g10.et1 = win.g10.add('edittext');
    win.g10.et1.preferredSize=[50,20];
    win.g10.et1.onChanging = function() {
      if (this.text.match(/[^\-\.\d]/)) {
        this.text = this.text.replace(/[^\-\.\d]/g, '');
    win.g100 =win.p1.add('group');
    win.g100.orientation = "row";
    win.g100.alignment='fill';
    win.g100.bu1 = win.g100.add('button',undefined,'Set Font Size');
    win.g100.bu1.preferredSize=[130,25];
    win.g100.bu2 = win.g100.add('button',undefined,'Cancel');
    win.g100.bu2.preferredSize=[130,25];
    win.g100.bu1.onClick=function(){
    if(win.g10.et1.text == ''){
        alert("No text size has been entered!");
        return;
    win.close(0);
    var txtList = new Array();
    if(win.g5.rb1.value){
        txtList = getTxtLayers();
        }else{
    var sels = getSelectedLayersIdx();
    for(var z in sels){
    var isTxtArray = isTxtLayer(Number(sels[z]));
    if(isTxtArray == false) continue;
    isTxtArray = String(isTxtArray).split(',');
        txtList.push([[Number(isTxtArray[0])],[String(isTxtArray[1])]]);
    for(var s in txtList){
        selectLayerById(Number(txtList[s][0]));
    if(String(app.version).match(/^\d+/) == 13){
    if(getTextdivideFactor() != 0){
    app.activeDocument.activeLayer.textItem.size= (Number(win.g10.et1.text)/Number(getTextdivideFactor()));
    }else{
        app.activeDocument.activeLayer.textItem.size= (Number(win.g10.et1.text));
    }else{
        app.activeDocument.activeLayer.textItem.size= (Number(win.g10.et1.text));
    win.show();
    function getTextdivideFactor(){
    var ref = new ActionReference();
    ref.putEnumerated( charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
    var desc = executeActionGet(ref).getObjectValue(stringIDToTypeID('textKey'));
    var textSize =  desc.getList(stringIDToTypeID('textStyleRange')).getObjectValue(0).getObjectValue(stringIDToTypeID('textStyle')).getDouble (stringIDToTypeID('size'));
    if (desc.hasKey(stringIDToTypeID('transform'))) {
                var mFactor = desc.getObjectValue(stringIDToTypeID('transform')).getUnitDoubleValue (stringIDToTypeID("yy") );
                return mFactor;
    return 0;
    function selectLayerById(ID, add) {
        add = (add == undefined)  ? add = false : add;
    var ref = new ActionReference();
    ref.putIdentifier(charIDToTypeID('Lyr '), ID);
    var desc = new ActionDescriptor();
    desc.putReference(charIDToTypeID('null'), ref);
    if (add) {
      desc.putEnumerated(stringIDToTypeID('selectionModifier'), stringIDToTypeID('selectionModifierType'), stringIDToTypeID('addToSelection'));
    desc.putBoolean(charIDToTypeID('MkVs'), false);
    executeAction(charIDToTypeID('slct'), desc, DialogModes.NO);
    function isTxtLayer(idx){
    var ref = new ActionReference();
    ref.putIndex( charIDToTypeID('Lyr '), idx );
    var desc = executeActionGet(ref);
    var isTxt = new Array();
    if(desc.hasKey(stringIDToTypeID('textKey'))){
    var Id = desc.getInteger(stringIDToTypeID( 'layerID' ));
    var layerName = desc.getString(charIDToTypeID( 'Nm  ' ));
    isTxt.push([[Id],[layerName]]);
    return isTxt;
    }else{ return false;}
    function getTxtLayers(){
       var ref = new ActionReference();
       ref.putEnumerated( charIDToTypeID('Dcmn'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
       var count = executeActionGet(ref).getInteger(charIDToTypeID('NmbL')) +1;
       var Names=[];
    try{
        activeDocument.backgroundLayer;
    var i = 0; }catch(e){ var i = 1; };
       for(i;i<count;i++){
           if(i == 0) continue;
            ref = new ActionReference();
            ref.putIndex( charIDToTypeID( 'Lyr ' ), i );
            var desc = executeActionGet(ref);
            var layerName = desc.getString(charIDToTypeID( 'Nm  ' ));
            var Id = desc.getInteger(stringIDToTypeID( 'layerID' ));
            if(layerName.match(/^<\/Layer group/) ) continue;
            if(desc.hasKey(stringIDToTypeID("textKey"))) Names.push([[Id],[layerName]]);
    return Names;
    function getSelectedLayersIdx(){
          var selectedLayers = new Array;
          var ref = new ActionReference();
          ref.putEnumerated( charIDToTypeID("Dcmn"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
          var desc = executeActionGet(ref);
          if( desc.hasKey( stringIDToTypeID( 'targetLayers' ) ) ){
             desc = desc.getList( stringIDToTypeID( 'targetLayers' ));
              var c = desc.count
              var selectedLayers = new Array();
              for(var i=0;i<c;i++){
                try{
                   activeDocument.backgroundLayer;
                   selectedLayers.push(  desc.getReference( i ).getIndex() );
                }catch(e){
                   selectedLayers.push(  desc.getReference( i ).getIndex()+1 );
           }else{
             var ref = new ActionReference();
             ref.putProperty( charIDToTypeID("Prpr") , charIDToTypeID( "ItmI" ));
             ref.putEnumerated( charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
             try{
                activeDocument.backgroundLayer;
                selectedLayers.push( executeActionGet(ref).getInteger(charIDToTypeID( "ItmI" ))-1);
             }catch(e){
                selectedLayers.push( executeActionGet(ref).getInteger(charIDToTypeID( "ItmI" )));
         var vis = app.activeDocument.activeLayer.visible;
            if(vis == true) app.activeDocument.activeLayer.visible = false;
            var desc9 = new ActionDescriptor();
        var list9 = new ActionList();
        var ref9 = new ActionReference();
        ref9.putEnumerated( charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
        list9.putReference( ref9 );
        desc9.putList( charIDToTypeID('null'), list9 );
        executeAction( charIDToTypeID('Shw '), desc9, DialogModes.NO );
        if(app.activeDocument.activeLayer.visible == false) selectedLayers.shift();
            app.activeDocument.activeLayer.visible = vis;
          return selectedLayers;

  • Selecting multiple text in JTextArea

    Howdy Java folks! I've been busting my butt trying to select more than one piece of text in a JTextArea. For example, I would like to:
    textArea.select(0, 4); // and then select another piece of text
    textArea.select(7, 9); // and show both text snippets highlighted
    But I would like to keep both and possible more pieces of text highlighted. The 2nd select() will override the first thus only showing the last area selected.
    Can anyone point me in the right direction? Thanks a mucho.

    Try this. It selects vertical block of text.
    best regards
    Stas
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.datatransfer.*;
    import javax.swing.*;
    import javax.swing.text.*;
    import javax.swing.plaf.*;
    import javax.swing.plaf.basic.*;
    public class Test
    JFrame frame;
    JTextArea ta;
    public static void main(String args[])
    new Test();
    public Test()
    frame = new JFrame();
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    ta=new JTextArea("test11111\ntest22222\ntest33333\ntest44444\ntest55555\n");
    ta.setCaret(new Caret_());
    JScrollPane scroll=new JScrollPane(ta);
    frame.getContentPane().setLayout(new BorderLayout());
    frame.getContentPane().add(scroll,BorderLayout.CENTER);
    JButton copy=new JButton("Copy");
    ActionListener lst=new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    try {
    Highlighter.Highlight[] selections= ta.getHighlighter().getHighlights();
    String text="";
    int cnt=selections.length;
    for (int i=0; i<cnt; i++) {
    int start=selections.getStartOffset();
    int end=selections[i].getEndOffset();
    String selectedText=ta.getDocument().getText(start,end-start);
    text+=selectedText+'\n';
    System.err.println(selectedText);
    StringSelection ss=new StringSelection(text);
    Toolkit.getDefaultToolkit().getSystemClipboard().setContents(ss,ss);
    catch (Exception ex) {
    ex.printStackTrace();
    copy.addActionListener(lst);
    frame.getContentPane().add(copy,BorderLayout.SOUTH);
    frame.setSize(300,200);
    frame.setVisible(true);
    class Caret_ extends DefaultCaret {
    Point lastPoint=new Point(0,0);
    public void mouseMoved(MouseEvent e) {
    super.mouseMoved(e);
    lastPoint=new Point(e.getX(),e.getY());
    public void mouseClicked(MouseEvent e) {
    super.mouseClicked(e);
    getComponent().getHighlighter().removeAllHighlights();
    protected void moveCaret(MouseEvent e) {
    Point pt = new Point(e.getX(), e.getY());
    Position.Bias[] biasRet = new Position.Bias[1];
    int pos = getComponent().getUI().viewToModel(getComponent(), pt, biasRet);
    if(biasRet[0] == null)
    biasRet[0] = Position.Bias.Forward;
    if (pos >= 0) {
    setDot(pos);
    Point start=new Point(Math.min(lastPoint.x,pt.x),Math.min(lastPoint.y,pt.y));
    Point end=new Point(Math.max(lastPoint.x,pt.x),Math.max(lastPoint.y,pt.y));
    customHighlight(start,end);
    protected void customHighlight(Point start, Point end) {
    getComponent().getHighlighter().removeAllHighlights();
    int y=start.y;
    int firstX=start.x;
    int lastX=end.x;
    int pos1 = getComponent().getUI().viewToModel(getComponent(), new Point(firstX,y));
    int pos2 = getComponent().getUI().viewToModel(getComponent(), new Point(lastX,y));
    try {
    getComponent().getHighlighter().addHighlight(pos1,pos2,((DefaultHighlighter)getComponent().getHighlighter()).DefaultPainter);
    catch (Exception ex) {
    ex.printStackTrace();
    y++;
    while (y<end.y) {
    int pos1new = getComponent().getUI().viewToModel(getComponent(), new Point(firstX,y));
    int pos2new = getComponent().getUI().viewToModel(getComponent(), new Point(lastX,y));
    if (pos1!=pos1new) {
    pos1=pos1new;
    pos2=pos2new;
    try {
    getComponent().getHighlighter().addHighlight(pos1,pos2,((DefaultHighlighter)getComponent().getHighlighter()).DefaultPainter);
    catch (Exception ex) {
    ex.printStackTrace();
    y++;

Maybe you are looking for