Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Swing equivalent of jQuery slideDown?

What's the standard/recommended way to animate Swing components similar to jQuery slideUp and slideDown animations?

I'd like to have my modal dialog grow and shrink to show an exception based on a button press e.g. "show exception" on an error dialog will open up a JTextArea that holds the exception, but the opening would have a slideDown effect where the additional content would quickly and smoothly expand vs suddenly appear.

My preference is to avoid thick third-party libraries, but I'll consider them if there's something stellar. Also, I'm genuinely curious how one would go about writing this thing with Swing...I'm familiar with Java, less so with Swing.

like image 611
Mark Elliot Avatar asked Dec 14 '25 16:12

Mark Elliot


1 Answers

the swingx library has this done already for you. Use the JXErrorPane. Here's a link:

http://swingx.java.net/

like image 75
sethu Avatar answered Dec 17 '25 06:12

sethu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!