Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 9 of 9

Thread: Copy paste functionality in AWT Canvas

  1. #1
    Junior Member
    Join Date
    Feb 2013
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Copy paste functionality in AWT Canvas

    Hi,
    We have created java applet using AWT Canvas. Only text has been displayed in this canvas. Now we want to give copy paste functionality in this applet.
    Please guide us how we can achieve this functionality.
    Please reply ASAP as it is very much required functionality.

    Thanks,
    Ayaz Shaikh


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,612
    My Mood
    Hungover
    Thanks
    145
    Thanked 658 Times in 563 Posts

    Default Re: Copy paste functionality in AWT Canvas

    This thread has been cross posted here:

    http://www.java-forums.org/awt-swing/68557-copy-paste-functionality-awt-canvas.html

    Although cross posting is allowed, for everyone's benefit, please read:

    Java Programming Forums Cross Posting Rules

    The Problems With Cross Posting

    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    22,340
    Thanks
    56
    Thanked 2,376 Times in 2,346 Posts

    Default Re: Copy paste functionality in AWT Canvas

    How would the "copy/paste" functionality work? Please explain in some detail.
    If you don't understand my answer, don't ignore it, ask a question.

  4. #4
    Junior Member
    Join Date
    Feb 2013
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Copy paste functionality in AWT Canvas

    Hi Norm,
    1. User will be allowed to select the text from the canvas (i.e. Applet) and then click "Copy" option then click "Paste" to paste the selected text to the canvas (i.e. Applet).
    2. User will be allowed to select the text from the canvas (i.e. Applet) and then click "Copy" option then paste to the application other than Applet.
    3. User can copy the text from application other than Applet and then paste it to the applet I have created.
    Please let me know if you still require more details.

    Thanks,
    Ayaz Shaikh

  5. #5
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    22,340
    Thanks
    56
    Thanked 2,376 Times in 2,346 Posts

    Default Re: Copy paste functionality in AWT Canvas

    If you don't understand my answer, don't ignore it, ask a question.

  6. #6
    Junior Member
    Join Date
    Feb 2013
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Copy paste functionality in AWT Canvas

    I haven't tried any option as I don't know how to resolve this issue. Even I don't have any hint to solve this issue. It would be great if you help me on this problem.

  7. #7
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    22,340
    Thanks
    56
    Thanked 2,376 Times in 2,346 Posts

    Default Re: Copy paste functionality in AWT Canvas

    What happens with your current applet code when you try to select text in it and copy it to the clipboard?
    If you don't understand my answer, don't ignore it, ask a question.

  8. #8
    Junior Member
    Join Date
    Feb 2013
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Copy paste functionality in AWT Canvas

    Canvas does not have feature to select the text and copy/paste it. I want to know how can I achieve this functionality in canvas.

  9. #9
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    22,340
    Thanks
    56
    Thanked 2,376 Times in 2,346 Posts

    Default Re: Copy paste functionality in AWT Canvas

    Can you post some code that shows what you are trying to do?
    One part of the project will be to allow a user to "select" something shown in an applet.
    Post some code that shows what you would want to be select-able.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Replies: 4
    Last Post: January 24th, 2013, 11:20 AM
  2. Replies: 7
    Last Post: January 24th, 2013, 10:41 AM
  3. Looking for a Image class with the following functionality.
    By ishtar in forum Java Theory & Questions
    Replies: 2
    Last Post: December 19th, 2011, 05:31 AM
  4. Need Help Adding Functionality to GUI!
    By Black Balloon in forum AWT / Java Swing
    Replies: 1
    Last Post: August 29th, 2011, 08:16 AM
  5. FAX Functionality in JAVA Application
    By animesh in forum Java Theory & Questions
    Replies: 0
    Last Post: February 11th, 2010, 07:39 AM