Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java Swing element transitions

I am trying to make a small non-commercial app and make it have a well designed interface, with screen transitions and such. I have every "screen" on separate panels in one JFrame and wish to be able to slide them smoothly when transitioning between panels. Is there any way to accomplish this somewhat easily?

like image 968
Dennis Avatar asked May 14 '11 07:05

Dennis


2 Answers

Since you did not accepted an answer yet, may I suggest you the SlidingLayout library? It's a very small library which aim is to create smooth transitions between two layouts of some components. Thus, making a transition between two screens is very easy to do. Here's an example I just made:

enter image description hereenter image description here

The difference between the two transitions relies on two lines of code. You can also create more fancy transitions by applying a different delay on each component, so they appear not all at once but with some timing variations between them.

I hope it may be useful to you :)

like image 138
Aurelien Ribon Avatar answered Sep 22 '22 00:09

Aurelien Ribon


This is a typical animation use case. The easiest way is to use animation framework. I'd suggest Trident

like image 39
Eugene Ryzhikov Avatar answered Sep 20 '22 00:09

Eugene Ryzhikov