Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #3812
| From | "John B. Matthews" <john.b..matthews@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: JTabbedPane when smoo |
| Message-ID | <nospam-BA1B41.14133223072008@aioe.org> (permalink) |
| Newsgroups | comp.lang.java.gui |
| References | <4886fab2$1@news.uni-rostock.de> |
| Date | 2011-04-27 15:47 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui In article <4886fab2$1@news.uni-rostock.de>, Stefan Rybacki <noemail@noemail.foobar> wrote: > 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? If the image is not completely opaque, might this be the problem: <http://java.sun.com/javase/6/docs/api/javax/swing/JComponent.html#paintC omponent(java.awt.Graphics)> -- John B. Matthews trashgod at gmail dot com home dot woh dot rr dot com slash jbmatthews --- * 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 | Next — Previous in thread | Find similar | Unroll 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