Java - 可视地拖动摆动元素

Java - visually drag a swing element(Java - 可视地拖动摆动元素)
本文介绍了Java - 可视地拖动摆动元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

有没有类似http://allen-sauer.com/com.allen_sauer.gwt.dnd.demo.DragDropDemo/DragDropDemo.html#PaletteExample 但对于普通的 Java 应用程序,即允许在画布上拖动 gui 元素?

Is there a similar solution to http://allen-sauer.com/com.allen_sauer.gwt.dnd.demo.DragDropDemo/DragDropDemo.html#PaletteExample but for normal Java applications, i.e. allowing gui elements to be dragged around on a canvas?

谢谢

推荐答案

是的,有可能.不,这不是微不足道的.

Yes, it's possible. No it's not trivial.

你会想成为farmiluar代码D'n'D API 如何使用 Java 2 进行拖放,第 1 部分

You'll want to become farmiluar with the code D'n'D API How to drag and drop with Java 2, Part 1

您可能想通读一遍

  • 平滑 JList 拖放目标动画
  • 平滑树掉落动画
  • 我的拖累图片比你的好
  • Dead Simple Drags
  • 花式水滴
  • 拖动图片为每个人......我们的意思是每个人
  • 放置目标导航,或者你拖着你的包
  • 摆动拖动图像,改进
  • 改进的拖动图像

您可能还想熟悉 GlassPane

You may also want to become familiar with the GlassPane

这篇关于Java - 可视地拖动摆动元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

相关文档推荐

How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)
How to make a report page direction to change to quot;rtlquot;?(如何使报表页面方向更改为“rtl?)
Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)
Is there any way to detect an RTL language in Java?(有没有办法在 Java 中检测 RTL 语言?)
How to load resource bundle messages from DB in Java?(如何在 Java 中从 DB 加载资源包消息?)
How do I change the default locale settings in Java to make them consistent?(如何更改 Java 中的默认语言环境设置以使其保持一致?)