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


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

Transparent JInternalFram

From "mearvk" <mearvk@THRWHITE.remove-dii-this>
Subject Transparent JInternalFram
Message-ID <1166518697.972992.163830@48g2000cwx.googlegroups.com> (permalink)
Newsgroups comp.lang.java.gui
Date 2011-04-27 15:27 +0000
Organization TDS.net

Show all headers | View raw


  To: comp.lang.java.gui
I have a transparent JInternalFrame (background set to
Color(0f,0f,0f,0f)) and on this I have a JScrollPane and on this I have
a JTree. All items have clear backgrounds. On my JDesktopPane I have a
JPEG for the background. What I am after is a way to repaint the
JInternalFrame so that when the JInternalFrame is moved, resized, etc.,
that it automatically (and quickly) repaints the underlying JDesktop
image inside the JInternalFrame (maintains illusion of transparency).

It is my understanding that a call to
JInternalFrame.paintComponents(JInternalFrame.getGraphics()) should
repaint all the components contained within the JInternalFrame.
However, this simply does not occur. What I get is an initially correct
looking JInternalFrame that when I move, the background becomes white.
When I use a thread to repaint the JInternalFrame I just get the JTree
text overwriting itself.

Additionally, I have tried paintAll() and repaint() at the JFrame,
JInternalFrame and JInternalFrame.getContentPane() levels...

Help greatly appreciated,

Mearvk

---
 * 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 | Find similar


Thread

Transparent JInternalFram "mearvk" <mearvk@THRWHITE.remove-dii-this> - 2011-04-27 15:27 +0000

csiph-web