Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #3810

JTabbedPane when smooth t

From "Stefan Rybacki" <stefan.rybacki@THRWHITE.remove-dii-this>
Subject JTabbedPane when smooth t
Message-ID <4886fab2$1@news.uni-rostock.de> (permalink)
Newsgroups comp.lang.java.gui
Date 2011-04-27 15:47 +0000
Organization TDS.net

Show all headers | View raw


  To: comp.lang.java.gui
Hi there,

I try to implement a JTabbedPane version that provides a smooth 
transition when changing tabs.
This is done by overriding setSelectedIndex. There the current content
is stored in a BufferedImage and then super.setSelectedIndex is called.
In the paint method the bufferedImage is used to draw above content 
painted by super.paint using an AlphaComposite with alpha values from 0 
to 1.
This works as expected as long as there are no JTextFields in the target 
tab. In that case the text fields pop up for an instant on tab change 
(just the text fields no other component like JButton, JCheckBox etc.)
After that the transition goes smoothly.
Also weird is that this happens only the first time that tab is 
displayed, afterwards changing to that tab works as expected.
The effect only occurs again, when the tabbed pane changes its bounds.

Any ideas on where to look to solve this issue?

Thanks in advance
Stefan

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

Back to comp.lang.java.gui | Previous | NextNext in thread | Find similar | Unroll thread


Thread

JTabbedPane when smooth t "Stefan Rybacki" <stefan.rybacki@THRWHITE.remove-dii-this> - 2011-04-27 15:47 +0000
  Re: JTabbedPane when smoo "John B. Matthews" <john.b..matthews@THRWHITE.remove-dii-this> - 2011-04-27 15:47 +0000

csiph-web