简体   繁体   English

我在java swing应用程序中使用Card布局,并希望对卡片更改从一个到另一个执行一些很好的效果

[英]I am using Card layout in java swing application and want to perform some nice effect on card change from one to another

In a java Swing application and if we are using Card layout for some panel than we use to show() method to show particular card.Show Method just make visible given card and disappear current card. 在一个java Swing应用程序中,如果我们使用Card布局的某些面板比我们使用show()方法显示特定的card.Show方法只是使可见的给定卡并消失当前卡。 Is it Possible to add some effects between this card swapping? 是否可以在此卡交换之间添加一些效果?

effects like :- 效果如 : -

  1. List item 项目清单
  2. Left to rightte moving. 左右移动。
  3. Top to Bottom. 从上到下。
  4. Fade in and Fade out effect. 淡入和淡出效果。
  5. Zooming Effect. 缩放效果。

Not with card layout. 没有卡布局。

You could take a look at the SlidingLayout , which is based on The Universal Tween Engine 你可以看看SlidingLayout ,它基于Universal Tween Engine

Another approach is to design a layout manager capable of providing the required functionality. 另一种方法是设计能够提供所需功能的布局管理器。 This is far more complex, but gives you an idea of what might be involved... 这要复杂得多,但可以让您了解可能涉及的内容......

For example, Animations when using Gridbag Layout. 例如, 使用Gridbag Layout时的动画。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM