May 14th, 2008,
Conference, Java, Swing.
Chet and I just posted our JavaOne 2008 slides online.
Any chance to see some YouTube thing about your presentation? :-)
Waow, what rapidity! So great, thanks a lot!
I hope that you will have more time to post more oftently….
Fabrizio: We didn’t video the presentation, and I don’t think that the JavaOne folks did either. So unless someone in the audience was wasting time and memory on it, I think that the slides will have to suffice. Just read the slides while imagining us speaking flawlessly and giving a truly compelling and remarkable presentation. (That wasn’t the case, of course, but this way you’ll be more satisfied with your imagined event than you would be with a video of the real thing)
Looks good, always excited to see new stuff from Chet and you. Any chance the source for your demo’s will be posted?
Thank you for publishing the slides. It’s very interesting for those who were not at J1 but reading the book to see how things evolve.
Merci pour les slides; c’est rassurant de voir de nouveaux posts sur e blog qui devenait bien mort ces temps-ci… Est ce faute de temps ou parce qu’il y a moins d’intéret à publier sur java swing ?
What’s the state of BlendComposite on Linux? The last time I attempted to use it for painting to a screen I was getting NotImplemented exceptions.
I am unfortunately incredibly busy with my work… I would love to blog more but the little spare time I have, I use it for other things :)
Sounds like a funebre walk for Swing/Java2D.
Where does this leave us in terms of Java2D & Swing at Sun now that Chet has left Sun?
I am having a problem with the AnimatedTransitions library of the book, maybe you have a hint for me.
I have a JTabbedPane and I’d like to animate the content of one tab (basically exchanging the content completely, which is a JPanel). There are nasty drawing effects if the user switches to another tab while the anim is being prepared or rendered (fade effect). The library then renders the content from the other tab into the tab that the user just switched to. Is this a known limitation or is there a way around it? Thanks!
There are definitely limitations to the animtrans library. The problem you’re running into here is that the transition is happening in the same container where tabbed components are being swapped around. The transition doesn’t know anything about the individual tabs that are being changed out from under it – it’s just running an animation when it’s told to.
I think the best fix here, other than building more capabilities into the library, which probably won’t happen anytime soon, would be for you to detect the change and to stop the transition when it happens.
Thanks for the quick answer. But how do I stop the animation? :-)
One more question about the rendering: I thought, the transition is being rendered into the target container. But when I switch to another tab, the previous tab container is not visible anymore. So, why is the rendering then visible?
OK, stop() stops the Animation. But I get sometimes:
Exception in thread “AWT-EventQueue-0” java.lang.NullPointerException: glassPane cannot be set to null.
stop() works. So does cancel() (which stops the animation in its tracks, without sending out an end event).
I believe the tab artifact is because a tabbed pane just fakes separate components for each tab. They’re all just in the same container; the tabs are just like buttons that change the drawing in that single component.
As to the glass pane error you’re getting, I don’t know off-hand; I’d have to debug the situation (which unfortunately isn’t possible, as I’m pretty busy working on pretty unrelated stuff at the moment). Hopefully, between the ability to insert yourself in the animation process, to debug the source code, and to change the code to your heart’s content, you can make it do what you need it to.
I got the stopping working reliable now. But I think there is a memory leak. After doing some transitions, I got lots of short in memory, occupying >20MB that are not being freed by GC. Looking at the heap dump, they are being held by ScreenTransition, OffScreenImage, WinCachingSurfaceManager and other classes that sound like the Animation library.
If I do not use animations, then my heap ends up much smaller.
I set my Animation object reference to null after the animation (in the end() method of the TimingTarget), so I should not hold any references.
I can reproduce the leak in a small test program. But it seems, it only happens with Window Look&Feel. Any ideas?
This is already being discussed here:
Nov 26, 2016 | Discuss
Mar 25, 2015 | 29 Comments
Two years ago, I published an articled titled Android Performance Case Study to help Android develop[…]
Some photographs at curious-creature.com are licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
All other photographs and all text at curious-creature.com are copyright Romain Guy and are presented for web browser viewing only.
All content © 2017 by Romain Guy Read more about me