e641. making a component a drop target.txt
来自「这里面包含了一百多个JAVA源文件」· 文本 代码 · 共 21 行
TXT
21 行
public class DropTargetComponent extends JComponent implements DropTargetListener {
public DropTargetComponent() {
new DropTarget(this, this);
}
public void dragEnter(DropTargetDragEvent evt) {
// Called when the user is dragging and enters this drop target.
}
public void dragOver(DropTargetDragEvent evt) {
// Called when the user is dragging and moves over this drop target.
}
public void dragExit(DropTargetEvent evt) {
// Called when the user is dragging and leaves this drop target.
}
public void dropActionChanged(DropTargetDragEvent evt) {
// Called when the user changes the drag action between copy or move.
}
public void drop(DropTargetDropEvent evt) {
// Called when the user finishes or cancels the drag operation.
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?