添加动画/转换成Java Swing容器 [英] Adding animation/transitions to Java Swing containers

查看:229
本文介绍了添加动画/转换成Java Swing容器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是想知道,如果有Java库,允许对Java Swing容器之间的平滑过渡。

I just wanted to know if there are Java libraries that allow for smooth transitions between Java Swing Containers.

假设我有一个JFrame的一个Java GUI应用程序。基于用户的操作我想改变包含在我的JFrame JPanel中。现在,这是我可以做的。然而,这种改变是瞬间完成的。我希望做的是有一个缓慢过渡/动画,这样不是太硬的用户认知。

Suppose I have a Java GUI application with a single JFrame. Based upon user actions I would like to change the JPanel contained in my JFrame. Now, this I can do. However this change is instantaneous. What I would like to do is have a slow transition/animation so that it is not too hard on the users cognition.

具体的例子:

说出的JFrame我已经是有2个按钮和我有两个的JPanel, PANEL1 是Panel2 。根据该按钮,用户点击后,我将取代与任 PANEL1 是Panel2 。不过,我想这种变化是缓慢/动画(无论你怎么称呼它),一个淡入效果本身。所以我的问题是

Say the JFrame I have isframe having 2 buttons and I have two JPanel, panel1 and panel2. Depending on which button the user clicked, I would replace the frame with either panel1 or panel2. However I would like this change to be slow/animated (whatever you call it), a fade-in effect per se. So my question is

有一些Java库,允许这种转变?

如果不是,是否有其他桌面开发语言(S),我可以使用这样的过渡。我已经知道了JavaScript框架像jQuery,使这个的。但是,我要寻找的桌面开发(如果不是Java那么别的也可以)。

If not, are there other desktop development language(s) that I can use for such transition. I already know of Javascript frameworks like JQuery that allow for this. But, I am looking for desktop development (if not Java then anything else is also fine).

推荐答案

类似的东西?

我有同样的需求:流畅的组件,面板和屏幕切换和动画在我的应用程序,创建一个花哨的UI。因为我曾经作出了动画引擎(通用吐温引擎)对于Java,我很快就设置一个非常小的,易于使用的库中创建用户界面秋千等动画中, SlidingLayout库

I had the same need: smooth transitions and animations of components, panels and screens in my app, to create a fancy UI. Since I once made an animation engine (Universal Tween Engine) for java, I quickly setup a very small and easy-to-use library to create such animations in swing UIs, the SlidingLayout library.

如果这就是你要找的,有在您需要帮助设置的lib项目中的情况下,一个专门的论坛。

If that's what you're looking for, there is a dedicated forum in case you need help to setup the lib in your project.

这篇关于添加动画/转换成Java Swing容器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆