Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How to write( cut and paste , Drag and drop)general codes in swing

Posted on 2001-07-20
4
256 Views
Last Modified: 2013-12-14
How to write( cut and paste , Drag and drop)general codes in swing.
0
Comment
Question by:sanroses
4 Comments
 
LVL 15

Expert Comment

by:ozymandias
ID: 6303614
I'm not sure what you mean by "general codes".

Drag and Drop in swing/java is implemented in the classes in java.awt.dnd.

Cut and paste can be done using the SystemClipboard.
Look at the getSystemClipboard() method of the Toolkit class.

There is a section of the java tutorial on Drag an Drop (http://java.sun.com/docs/books/tutorial/dnd/index.html).

There have aslo been several questions on it recently in this forum so it is probably worth checking the PAQ.
0
 
LVL 10

Expert Comment

by:Nushi
ID: 6305784
you will have to be more specific of what u need.

its 2 diffrent things.
Drag and drop can be writen with mouse listener for example
and text operations can be written with: DocumentListener

there isnt any single solution for this.
you will have to be more specific in describing your needs.

Nushi.
0
 
LVL 5

Expert Comment

by:vemul
ID: 7669573
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
- To be PAQ'ed and points NOT refunded
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

vemul
Cleanup Volunteer
0
 

Accepted Solution

by:
SpideyMod earned 0 total points
ID: 7714511
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question