Using a fake semi-transparency - what's really possible?

Hi,
  I'm just now moving into DW CS4 (from cs3) and I'm on an intel iMac. I'm trying to make a table background that is semi-transparent while KEEPING text and photos 100% opaque. I'm already familiar with this kind of code: (just improvising here):
.tableMain {
background: transparent;
filter=alpha(opacity=50);
opacity=.5
But this makes EVERYTHING semi-transparent - content and all. I'd love to know if it is possible to keep the content fully in view.
I've tried making a semi-transparent GIF or PNG background in Photoshop CS4 and using it for the table background, but that doesn't seem to work.
I did discover this (perhaps unique to my site) solution for a fake semi-transparency: Since I've got a gradient background on my site (see www.frankbright.com/History.htm ), I took a 'Screen Snapshot' of the background, from the bottom of the navigation to as far down as I could go. Then I used PS CS4 to expand the canvas and color down to cover my long pages. (See Jazz Links)
Then I used PS levels to darken the snapshot very slightly, so as to intimate a gray semi-transparent effect. Then I simply used that snapshot as the table background.
This looks better on the long, clearer pages that have only text content. With the index3 home page, however,  you don't sense the semi-transparent effect I'm going for as much.
I've also noticed the 'Extensions' area of the CSS interface in DW - does this have anything to do with what I'm trying to do?
Anyways, I'm open to ideas, if anyone could suggest any.
Many Thanks, Frank B.

Hi
You did not say what the problem was.
others viewing this thread. please read -
As for the colors of the background gradient using IEFilters, (for those who did not know on the forum, the IEFilter for background gradient was available since IE4.5, circa 1996, and all filters since IE5, circa 1998) you will need to adjust these as required. Luckily enough most background gradients go from one color to white or a lighter color of the starting color.
For FF and Safari see - http://hacks.mozilla.org/2009/11/css-gradients-firefox-36/, http://webkit.org/blog/175/introducing-css-gradients/.
Google Chrome uses the webkit declaration, but unfortunately Opera does not support the feature, (use a standard background color at the beginning of the declaration) and FF only from version 3.6. But with the upgrading for FF users normally being 70+% within 6 months, this does mean that 85% of users will support the background gradient.
PZ
Edit: If you are using a css reset then it may be worth placing the position: relative; statement in this, as these normally include all the elements from H1 to pre.
Message was edited by: pziecina

Similar Messages

  • What is really possible to achieve in mucow?

    Is it possible to build someting like contact form (similar to that included in muse) where graphics can be changed with in muse?
    Coold you give us examples (more complicated) than we can find in muse exchange ? 

    Since the user can't sub select anything inside a mucow widget, styling of pieces isn't fabulous. It's possible to provide some canned styling options as part of your mucow widget options though.
    Download these sample mucow files if you haven't already:
    http://muse.adobe.com/exchange-library/lances-sample-widgets
    The 'simple line' and '5x5 table' widgets provide examples of picking up Muse stroke/fill colors, and also providing options to style parts of the widget with the widget option UI.
    Also, you can use the 'inherit' css value to pick up some styling that users apply to your placed widget. For example on the 5x5 table widget, you can apply a font & font size in Muse, and that will be picked up by the text in the table.

  • Disabling EDGE vs. using a fake APN

    Does anyone know if there is a difference between disabling EDGE vs. leaving EDGE on and using a fake APN?
    What I mean is, does one drain battery faster than the other? I still need to leave 3G enabled so I can make 3G voice calls, but I don't want internet. I know both methods will disable internet, I'm wondering if one is preferred over another?
    Thanks

    Hey mate. Here's the deal:
    In Sydney we are able to purchase our iPhone outright with no plan and use it pre-paid, factory unlocked. So I did that, I don't have a data plan and I use data sparingly as they charge $2 per mb, so I just use it as needed very rarely.
    Yes I am on a 3G network, my phone will switch from 3G to GPRS or whatever it is by itself. If I'm in a 3G area it will use that.
    By disabling EDGE and leaving 3G enabled, I can not use the internet. It says no connection is established, which is good! I don't want to use my data.
    The other way of disabling data is by using a fake APN and leaving EDGE and 3G on.
    However I read somewhere that one will cause a massive battery drain, and I want to know through people's experiences which method is preferred to get the best performance. Both methods block data for me and still allow 3G for voice calling.
    Unfortunately I can't call my provider as a pre-paid customer and block data.
    null

  • How to use semi-transparent mask on external swf?

    I want to use semi-transparent mask on external swf for smooth transition. I'm using
    clip.cacheAsBitmap = true;
    mask.cacheAsBitmap = true;
    clip.setMask(mask);
    Everything works fine. But when I use
    loadMovie("http://www.url.com/movie.swf", "_root.clip");
    clip.cacheAsBitmap = true;
    mask.cacheAsBitmap = true;
    clip.setMask(mask);
    it doesn't work... what am I doing wrong?

    well if your loadMovie is on the same timeline as the code you are setting as mask, then you dont need _root.
    And sorry, I forgot there was an issue with masking the main mc that loadMovie is loading into. So what I did was put clip inside another mc and called that mc "container" so then my code would look like :
    masker.cacheAsBitmap = true;
    container.cacheAsBitmap = true;
    container.setMask(masker);
    container.clip.loadMovie("movietoload.swf");
    download the two swfs attached, and open main.swf to see.

  • TS1398 We a trying to start a apple ID acc for my daughters new IPod touch. I have a apple ID acc with mt Iphone. It wont let us use the same email address, but wont let us use a fake one either. What do we do?

    we are trying to open a apple ID acc for my daughters IPod touch.I have a apple ID acc with my IPhone. It wont let us us use the same email ( she doesnt have one) but wont let us us a fake one. What do we do?

    The only way to get an apple ID is to have an email account you've never used before. The only thing you can do is make her an email.

  • I sync my iphone with my office computer, but what I really would like to do is syncing only the calendars (because my secretary uses them to set up new apppointments), but syncing all the rest on my home computer. Is it possible without losing apps or mu

    I sync my iphone with my office computer, but what I really would like to do is syncing only the calendars (because my secretary uses them to set up new apppointments), but syncing all the rest on my home computer. Is it possible without losing apps or music?

    Although not recommended, yes.
    Disable automatic syncing when the iPhone is connected with iTunes on each computer.
    The only item you will have selected for syncing with iTunes on your computer at work will be Calendars, which is selected under the Info tab for your iPhone sync preferences with iTunes. Nothing else will be selected under the various tabs for your iPhone sync preferences with iTunes on your computer at work. You will get a warning message that your iPhone is associated with another iTunes library on a different computer which you can ignore when syncing calendars/calendar events only with iTunes on your computer at work.

  • What's most efficient for drawing a semi-transparent overlay?

    I have a large .TIF loaded as a RenderedImage through JAI and drawn with Graphics2D.drawRenderedImage(). It can be scaled by the user and it uses the JAI operator "Scale" to do it and is extremely fast given the size if the TIF (2528x3297).
    The problem comes when I need to take another image and use it as an "overlay". Only the red part of this image needs to actually be drawn, and that needs to have some transparency. The rest of the image should be completely transparent. I'm looking for a fast and efficient way of approaching both the drawing and scaling. Any type of image (supported by AWT/JAI at least) is acceptable, passing it through a filter at runtime to make the parts transparent or semi-transparent is fine too. I'm just looknig for a good methodology that will offer speed in both drawing and scaling in conjunction with the TIF mentioned earlier.
    I tried using a PNG that already had the desired transparency but it behaves oddly. If I load it as an Image using ImageIO.read() and then use drawImage() and getScaledInstanceOf() it draws relatively slowly, but just barely acceptable, but takes way too long to scale. If I load it as a RenderedImage with JAI and use drawRenderedImage() the painting is extremely fast when it's first loaded with no scaling and when i scale it it's fairly fast at scaling, but after it's been scaled it draws extremely slowly.
    I tried using a GIF but had pretty much the exact same issues as PNG. Slow scaling and decent drawing as an Image and quick scaling and drawing initially, but extremely slow drawing after it's been scaled.
    Strangely enough one of the best middle grounds I've seen in my experimentations was a .TIF I loaded in JAI, converted to BufferedImage, passed through a filter to make all white transparent and all black be red, and then drew as a BufferedImage.
    I'm totally lost and confused here. Could someone please help me out with some advice?

    Ah, that's the kind of confirmation I was hoping for, thanks! Though if anyone has anything else to weigh in (specific considerations and the like) then feel free!

  • Semi transparent models, using a greyscale image

    Hi,
    Ive done a few searches on the forum for this. But couldnt
    find a specific answer. With regards to textures with alpha
    channels, and im not sure if im aiming in the right direction.
    I want to have a semi transparent model, of a hair model
    actually. I have a grayscale image, which is the alpha channel
    information, and i have a number of textures of various hair
    colours that work with this greyscale alpha jpg.
    I'd like to assign the alpha channel jpg to textureList[1],
    to ahieve transparency according to the greyscale image. then apply
    the specific hair colour jpg to textureList[2].
    Ive played around with blend, blendSource and blendConstant,
    and I can get a bit of an effect(streaks in the girls hair), but
    not the alpha channel effecting the visibility of the model effect
    i'm after.
    Is it possible to affect the visibility of a models polys,
    through a greyscale texture/jpg being used for alpha channel
    information? Is there another way, that ive missed?
    Thanks in advance,
    Glenno

    You could even animate the alpha of the image using imaging
    lingo. To set it on a single #fromImageObject texture you will need
    to create two images, a 32 bit "host" image and an 8 bit grayscale
    image. You can then use setAlpha() to apply the alpha information
    to your host image and then create the texture using the 32 bit
    imageobject (with the correct texturerenderformat). If either the
    host imageobject is not 32 bit or the grayscale image not 8 bit the
    setAlpha() operation will fail silently.

  • What to do, what to do...InDesign - Drop shadow adds semi-transparent box in PDF

    I am having an issue when I add a drop shadow to an object. It looks fine in the InDesign file, but once I export it to PDF (high res - (low res looks fine)), around the object yes there is the shadow, but also there is a semi transparent box. I don't know how to remove that. I've been looking at the preferences but don't understand why that happens. I printed it out and the box comes out. Please Help!!! Thanks
    I am using ID CS4

    http://indesignsecrets.com/eliminating-the-white-box-effect.php
    http://indesignsecrets.com/eliminating-ydb-yucky-discolored-box-syndrome.php

  • When using one of the Windows 7 (32x) Aero themes, PDF's are displayed semi-transparent.

    I can't read PDF's in my Firefox browser anymore. It looks as if they are semi-transparent: The fonts are blurry, and they have the same color as my Aero theme frame. I can see my desktop photo through the fonts. When I save the PDF's and open them offline, they are displayed as they should. The prints also look normal. Btw, when I change to a classic theme, PDF's are displayed normal.

    this problem also posted here: https://support.mozilla.com/en-US/questions/863361

  • How to apply a semi-transparent background to a text box

    Hi Framers,
    The cover of my doc has a full-page .png file on a master page. I want to add the title of the manual on the body page of the cover in a text box. No problem. However, I want to apply a semi-transparent effect to the background of the text box, so the graphic behind it shows in a muted way.
    I'm sure this has to do with some combination of the Tint, Fill, and Overprint settings but none of my experiments have produced anything close to the desired effect.
    I did RTFM and also searched the Help and the forum. I truly hope I didn't overlook the answer---but if I did, it wasn't for lack of trying!
    As always, your expertise is very much appreciated.
    TIA,
    Gay

    Wow, I wish I had Photoshop! I use a less sophisticated image editor, which has always served quite adequately and since it supports layers, I'll try to figure out how to do what you're suggesting.
    (I did try a "None" fill and the bottom image does show up, but I wanted it a bit muted, as would happen with perhaps a "half transparency" and that is apparently what I can't achieve in FM.)
    If I understand correctly, I need to edit the imported graphic to make a portion of it appear semi-transparent, and then when I bring it back into FM and put my text box on top of it, it will appear the same as if I had been able to put a partial transparency in the fill of the text box...
    I really, really, really hate it when I find myself thinking "Word could do this easily, why can't Frame?"
    Thanks for your helpful suggestions, guys, you're great. As always!
    Gay

  • Having a JPanel 'float' semi-transparently over another component

    I am a programmer of a java project for our company.
    Managemnt decided that when a certain event happens, we need to 'semi-disable' a certain text area (in a JScrollPane), and have a floating message with a progress bar on top of this text area, but be semi-transparent, so you can still read the text under it.
    (Basically, they want it to look like a html page with a floating, semi-transparent DIV, because that is how another group mocked it up).
    I am trying to implement this, but am running into problems.
    Here is what I have, below I'll tell you what is wrong with it.
         * The purpose of this class is to have a scroll pane that can have it's contents partially covered by another panel
         * while still being able to read both the original panel and the new covering content, and still being able to scroll
         *the content under the covering panel.
        public class JOverlayScrollPane extends JScrollPane{
            private JPanel overlay = null;
            private Insets overlayInsets = null;
            private java.awt.AlphaComposite blend = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.50f);
            private ComponentAdapter cl = null;
            public void setOverlay(JPanel pan, Insets inset){
                overlay = pan;
                overlayInsets = inset;
                if(cl != null){
                    cl = new ComponentAdapter(){
                        public void componentResized(ComponentEvent e){
                            resizeOverlay();
                resizeOverlay();
                repaint();
            public void paint(Graphics g){
                super.paint(g);
                if(g instanceof Graphics2D && overlay !=null){
                    Graphics2D g2 = (Graphics2D)g;
    //                g2.setComposite(blend);
                    //overlay.paint(g2);
                    paintStuff(g,overlay);
            private void resizeOverlay(){
                if(overlay != null){
                    Dimension size = getSize();
                    int x = 0;
                    int y = 0;
                    if(overlayInsets !=null){
                        x = overlayInsets.left;
                        y = overlayInsets.top;
                        size.width = size.width - overlayInsets.left - overlayInsets.right;
                        size.height = size.height - overlayInsets.top - overlayInsets.bottom;
                    overlay.reshape(x,y, size.width, size.height);
                    overlay.doLayout();
                    overlay.validate();
            private void paintStuff(Graphics g,Component c){
                if(c != null){
                    c.paint(g);
                    if(c instanceof Container){
                        Container cont = (Container)c;
                        for(int i=0;i<cont.getComponentCount();i++){
                            Component cc = cont.getComponent(i);
                            paintStuff(g,cc);
        }//end of overlay scroll pane(I am having problems, so for now, the alpha blend is commented out).
    The first version didn't have the paintStuff() method (it just called paint). This just drew a big grey box, now of the sub-components of the passed in JPanel were drawing. I added the do layout and validate calls, without success.
    Then I added the paintStuff call, and all the subcomponents now, draw, but they all draw at 0,0.
    Questions
    1. Is the the correct approach to do this, or sould I be playing with the glass pane or some other approach?
    2. It seems that the overlay panel isn't being layed out / doens't paint it's children correctly. Is this because it isn't really part of the layout (i.e. it has no parent / is never added to a container) or am I just missing a step in 'faking' adding it to a layout?
    3. I'm sure I could just override paint and paint my own stuff (hand draw the text and a progress bar), but I would really like to put everything on one JPanel as what we want to display my be different in the future. I know that I manually ahve to call repaint on this scrollpane if one of the components on the overlay JPanel change in appearence (the progress bar especailly), and that they won't get events (I don't care about this as they are all non-interactive for now). Is this a viable approach, or is there a better way to do this?
    Thanks

    Wow, good answer.
    I never concidered using a root pane other than as it is used in JFrame.
    Very cool answer.
    Here is my origional code modifed with JN_'s idea, which cleaned up a repaint issue I was having.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class TransparentPanel extends JFrame implements ActionListener
        ProgressPanel progressPanel;
        int progressCount;
        public TransparentPanel()
            super( "TransparentPanel Test");
            setDefaultCloseOperation( EXIT_ON_CLOSE );
            JPanel panel = new JPanel( new BorderLayout() );
            JTextArea area = new JTextArea( 20, 40 );
            JRootPane pane = new JRootPane();
            pane.setContentPane( new JScrollPane( area ) );
            panel.add( pane, BorderLayout.CENTER );
            //panel.add( new JScrollPane( area ), BorderLayout.CENTER );
            progressPanel = new ProgressPanel();
            pane.setGlassPane( progressPanel );
            JPanel buttonPanel = new JPanel( new FlowLayout());
            JButton button = new JButton( "Show" );
            button.setActionCommand("SHOW");
            button.addActionListener( this );
            buttonPanel.add( button );
            button = new JButton( "Hide" );
            button.setActionCommand("HIDE");
            button.addActionListener( this );
            buttonPanel.add( button );
            panel.add( buttonPanel, BorderLayout.SOUTH);
            setContentPane( panel );
            pack();
            setLocationRelativeTo( null );
            setVisible( true );
        public static void main( String[] args )
            try
                UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
            catch( Exception e )
                e.printStackTrace();
            new TransparentPanel();
        public class ProgressPanel extends JPanel
            Color bg = new Color( 225, 221, 221, 100 );
            Color fg = new Color( 170, 234, 202, 100 );
            int progress;
                   setOpaque( false );
            public void setProgress( int n )
                 setVisible( n > 0 && n <= 100 );
                progress = n;
                repaint();
            public void paint( Graphics g )
                if( isVisible() )
                    Rectangle bounds = getBounds();
                    g.setColor( bg );
                    g.fillRect( bounds.x, bounds.y, bounds.width, bounds.height );
                    g.setColor(  fg );
                    int width = (int)(((double)progress/100)*bounds.width);
                    int height = (int) (((double)bounds.height)*.1);
                    int y = (int) (((double)bounds.height)*.4);
                    g.fillRect( bounds.x,y,width,height);
         * Invoked when an action occurs.
        public void actionPerformed(ActionEvent e)
            String cmd = e.getActionCommand();
            if(cmd.equals( "SHOW" ) )
                progressCount+= 10;
                if( progressCount > 100 )
                    progressCount = -1;
            else if( cmd.equals("HIDE" ) )
                progressCount = -1;
            progressPanel.setProgress( progressCount );
    }

  • - Looking for Drop Down menu script w/ semi-transparent backgrounds...

    Looking for a dropdown menu script that will allow
    semi-transparent
    backgrounds (so we can partly see what the list is displaying
    over).
    I've Googled this to death using all the obvious keywords,
    but have yet to
    find what I'm looking for.
    Thanks.

    Yes. I understand and agree. Good point.
    Thanks.
    Al Sparber - PVII
    http://www.projectseven.com
    Extending Dreamweaver - Nav Systems | Galleries | Widgets
    Authors: "42nd Street: Mastering the Art of CSS Design"
    "T.Pastrana - 4Level" <[email protected]> wrote in message
    news:[email protected]...
    >I posted mainly for the benefit of Reese, I know you know
    this.
    >
    >
    > --
    > Best Regards,
    > ..Trent Pastrana
    > www.fourlevel.com
    >
    >
    >
    >
    >
    >
    > "Al Sparber- PVII" <[email protected]>
    wrote in message
    > news:[email protected]...
    >> Actually, it's not an error. But we do happen to
    have it in a CC on
    >> that page because the last time I posted that page
    on this forum it
    >> was criticized for "failing" the W3C CSS validator.
    >>
    >>
    http://www.projectseven.com/foxy.gif
    >>
    >> The Firefox console simply would report it as a
    warning - not an
    >> error. It would have no affect on the page. But
    thanks for pointing
    >> that out.
    >>
    >> --
    >> Al Sparber - PVII
    >>
    http://www.projectseven.com
    >> Extending Dreamweaver - Nav Systems | Galleries |
    Widgets
    >> Authors: "42nd Street: Mastering the Art of CSS
    Design"
    >>
    >>
    >>
    >>
    >> "T.Pastrana - 4Level" <[email protected]> wrote in
    message
    >> news:[email protected]...
    >>> If you want your page to validate you might want
    to separate the
    >>> properties. Some modern browsers like Firefox
    will throw an error
    >>> with the filter property.
    >>>
    >>> #menu li {
    >>> opacity: 0.85;
    >>> }
    >>>
    >>> <!--[if IE]><style
    type="text/css">#menu li {filter:
    >>>
    alpha(opacity=85);}</style><![endif]-->
    >>>
    >>>
    >>> --
    >>> Best Regards,
    >>> ..Trent Pastrana
    >>> www.fourlevel.com
    >>>
    >>>
    >>>
    >>>
    >>> "Al Sparber- PVII"
    <[email protected]> wrote in message
    >>> news:[email protected]...
    >>>> If, for example, you are using an unordered
    list for your menu, set
    >>>> opacity on the LI, like so:
    >>>>
    >>>> #menu li {
    >>>> opacity: 0.85;
    >>>> filter: alpha(opacity=85);
    >>>> }
    >>>>
    >>>> As far as I know, there are no
    "off-the-shelf" menu tools of worth
    >>>> that offer this as an automatic option. You
    should pick yourself a
    >>>> good menu system then set opacity on the
    relevant element. The
    >>>> menu "script" or "system" really has nothing
    to do with it.
    >>>>
    >>>> If you need a good base menu system, you can
    find free ones and
    >>>> commercial ones on our site. Here is an
    example of one with
    >>>> transparency:
    >>>>
    >>>>
    http://www.projectseven.com/products/menusystems/pmm/css_tweaks/opacity/
    >>>>
    >>>>
    >>>>
    >>>> --
    >>>> Al Sparber - PVII
    >>>>
    http://www.projectseven.com
    >>>> Extending Dreamweaver - Nav Systems |
    Galleries | Widgets
    >>>> Authors: "42nd Street: Mastering the Art of
    CSS Design"
    >>>>
    >>>>
    >>>>
    >>>>
    >>>> "Reese" <[email protected]> wrote in message
    >>>> news:[email protected]...
    >>>>> Looking for a dropdown menu script that
    will allow
    >>>>> semi-transparent backgrounds (so we can
    partly see what the list
    >>>>> is displaying over).
    >>>>>
    >>>>> I've Googled this to death using all the
    obvious keywords, but
    >>>>> have yet to find what I'm looking for.
    >>>>>
    >>>>> Thanks.
    >>>>>
    >>>>
    >>>
    >>>
    >>
    >
    >

  • An Image JPanel, A semi-transparent JPanel, and non-opaque components

    This is a more intelligent re-asking of the question I posed here: http://forum.java.sun.com/thread.jspa?threadID=579298&tstart=50.
    I have a class called ImagePane, which is basically a JPanel with an image background. The code is much like the ImagePanel posted by camickr, discussed in this topic: http://forum.java.sun.com/thread.jspa?forumID=57&threadID=316074 (except mine only draws the image, it does not tile or scale it).
    On top of my ImagePane, I can place another component, TransparentContainer. This again extends JPanel, only a color is specified in the constructor, and it is drawn at about 70% opacity. This component is meant to help increase the readability of text components that blend with the background image, without blocking out the background image completely.
    This works very well, until I need to add a component, like, say, a non-opaque JRadioButton in a ButtonGroup. When you select a new JRadioButton at runtime, the semi-transparent JPanel fills with a combination of a completely opaque color (the one specifies to the TransparentContainer) and garbage from the non-opaque component being redrawn.
    I have noticed that the UI is restored to being non-messed up if you place another application window on top of it and then move it. So apparently, one solution is to redraw the entire UI, or just the part that has the JRadioButton on it, every time the radio button is clicked. However, this seems unnecessarily complicated. It seems to me that I am missing something in my TransparentContainer's paintComponent() method. Does anyone have any ideas?
    Here is my TransparentContainer code, if it will help:
    import java.awt.AlphaComposite;
    import java.awt.Color;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.RenderingHints;
    import javax.swing.JPanel;
    public final class TransparentContainer extends JPanel
         /* Private Fields: For use only by this class.
          *  These fields hold information needed by more
          *  than one method of this class.
         private boolean fullTransparencyEnabled;
         private Color baseColor;
         private Color outerBorderColor;
         private Color innerBorderColor;
         private int obw;
         private int ibw;
         private int cbw;
         /* -- START OF METHODS -- */
         /* public TransparentContainer(Color color, boolean fullTrans)
          *   Initiallizes the transparent container object
          *   with 'color' as its base color.
         public TransparentContainer(Color color, boolean fullTrans)
              fullTransparencyEnabled = fullTrans;
              baseColor = color;
              Color borders[] = findBorderColors();
              outerBorderColor = borders[0];
              innerBorderColor = borders[1];
              obw = 3;
              ibw = 1;
              cbw = obw + ibw;
         /* private Color[] findBorderColors(Color base)
          *   Calculates the colors for the outer and inner
          *   borders of the object based on the base color.
         private Color[] findBorderColors()
              Color borders[] = new Color[2];
              int colorData[] = new int[9];
              colorData[0] = getBaseColor().getRed();
              colorData[1] = getBaseColor().getGreen();
              colorData[2] = getBaseColor().getBlue();
              colorData[3] = colorData[0] - 50;          // outerBorder red
              colorData[4] = colorData[1] - 45;          // outerBorder green
              colorData[5] = colorData[2] - 35;          // outerBorder blue
              colorData[6] = colorData[0] + 30;          // innerBorder red
              colorData[7] = colorData[1] + 30;          // innerBorder green
              colorData[8] = colorData[2] + 20;          // innerBorder blue
              /* Make sure the new color data is not out of bounds: */
              for (int i = 3; i < colorData.length; i++)
                   if (colorData[i] > 255)
                        colorData[i] = 255;
                   else if (colorData[i] < 0)
                        colorData[i] = 0;
              borders[0] = new Color(colorData[3], colorData[4], colorData[5]);
              borders[1] = new Color(colorData[6], colorData[7], colorData[8]);
              return borders;
         /* public Color getBaseColor()
          *   Returns the baseColor of this object.
         public Color getBaseColor()
              return baseColor;
         /* public Color getOuterColor()
          *   Returns the outerBorderColor of this object.
         public Color getOuterColor()
              return outerBorderColor;
         /* public Color getInnerColor()
          *   Returns the innerBorderColor of this object.
         public Color getInnerColor()
              return innerBorderColor;
         /* public boolean getFullTransEnabled()
          *   Returns whether or not this object will render
          *   with all of its transparency effects.
         public boolean getFullTransEnabled()
              return fullTransparencyEnabled;
         /* protected void paintComponent(Graphics g)
          *   Paints the component with the borders and colors
          *   that were set up in above methods.
         protected void paintComponent(Graphics g)
              Graphics2D g2d = (Graphics2D) g;
              AlphaComposite alphaComp;
              g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
              g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
              g2d.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION,
                                            RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
              g2d.setColor(getBaseColor());
              /* Draw the main body of the component */
              if (getFullTransEnabled())
                   alphaComp = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.6f);
                   g2d.setComposite(alphaComp);
              else
                   alphaComp = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 1.0f);
                   g2d.setComposite(alphaComp);
              g2d.fillRect(cbw, cbw, super.getWidth() - 2 * cbw, super.getHeight() - 2 * cbw);
              alphaComp = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.6f);
              g2d.setComposite(alphaComp);
              /* Draw the inner border: */
              g2d.setColor(getInnerColor());
              g2d.fillRect(obw, obw, ibw, super.getHeight() - obw * 2); // left border
              g2d.fillRect(obw, obw, super.getWidth() - obw, ibw); // top border
              g2d.fillRect(super.getWidth() - cbw, obw, ibw, super.getHeight() - obw * 2); // right border
              g2d.fillRect(obw, super.getHeight() - cbw, super.getWidth() - obw * 2, ibw); // bottom border
              /* Draw the outer border: */
              g2d.setColor(getOuterColor());
              g2d.fillRect(0, 0, obw, super.getHeight()); // left border
              g2d.fillRect(0, 0, super.getWidth() + obw, obw); // top border
              g2d.fillRect(super.getWidth() - obw, 0, obw, super.getHeight()); // right border
              g2d.fillRect(0, super.getHeight() - obw, super.getWidth(), obw); // bottom border
              alphaComp = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 1.0f);
              g2d.setComposite(alphaComp);
              g2d.dispose();
    }

    I added the main method to your TransparentContainer class ...
         public static void main(String[] args) {
              JFrame f = new JFrame("test transparent container");
              f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              TransparentContainer tc = new TransparentContainer(Color.RED, true);
              JLabel label = new JLabel("Hello, World!");
              tc.add(label);
              f.getContentPane().add(tc);
              f.setSize(800, 600);
              f.setVisible(true);
         }...using the code you posted the label was not shown. I modified your paintComponent(Graphics g) method and I did this (see the areas in bold):
         /* protected void paintComponent(Graphics g)
          *   Paints the component with the borders and colors
          *   that were set up in above methods.
         protected void paintComponent(Graphics g)
              // Call super so components added to this panel are visible
              super.paintComponent(g);
              Graphics2D g2d = (Graphics2D) g;
              AlphaComposite alphaComp;
              g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
              g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
              g2d.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION,
                                            RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
              g2d.setColor(getBaseColor());
              /* Draw the main body of the component */
              if (getFullTransEnabled())
                   alphaComp = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.6f);
                   g2d.setComposite(alphaComp);
              else
                   alphaComp = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 1.0f);
                   g2d.setComposite(alphaComp);
              g2d.fillRect(cbw, cbw, super.getWidth() - 2 * cbw, super.getHeight() - 2 * cbw);
              alphaComp = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.6f);
              g2d.setComposite(alphaComp);
              /* Draw the inner border: */
              g2d.setColor(getInnerColor());
              g2d.fillRect(obw, obw, ibw, super.getHeight() - obw * 2); // left border
              g2d.fillRect(obw, obw, super.getWidth() - obw, ibw); // top border
              g2d.fillRect(super.getWidth() - cbw, obw, ibw, super.getHeight() - obw * 2); // right border
              g2d.fillRect(obw, super.getHeight() - cbw, super.getWidth() - obw * 2, ibw); // bottom border
              /* Draw the outer border: */
              g2d.setColor(getOuterColor());
              g2d.fillRect(0, 0, obw, super.getHeight()); // left border
              g2d.fillRect(0, 0, super.getWidth() + obw, obw); // top border
              g2d.fillRect(super.getWidth() - obw, 0, obw, super.getHeight()); // right border
              g2d.fillRect(0, super.getHeight() - obw, super.getWidth(), obw); // bottom border
              alphaComp = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 1.0f);
              g2d.setComposite(alphaComp);
              // Do not dispose the graphics
              // g2d.dispose();          
         }...seems to work fine now. Perhaps you should also add methods or additional constructors so the user can easily change the transparency level...and add some javadoc comments to your constructors ...at a first glance I did not know what fullTrans was
    public TransparentContainer(Color color, boolean fullTrans)good luck!!

  • Problem with opaque object/text showing as semi-transparent?

    I didn't start seeing this problem till today, but the past couple of times I've gone to create a new shape layer or text layer, it appears like it's at 50% opacity.  I've checked my layer settings, and they're all at 100% fill and opacity.  I can't see any reason why they'd be semi-transparent, and none of the settings I've tried have changed anything.  I've even tried deleting the shapes/text, saving my document, and starting over.  That worked one time, but this time it's not working.
    Even applying a color overlay still results in a semi-transparent shape.
    Anyone else have a similar issue and know how to fix it?  I am in the middle of doing a design for a client, for print, and I really can't be dealing with this right now.

    I ended up just deleting the group that was affected, saving it as a new file, and then rebuilding the new group from the new file. For some reason that worked.  I am not currently have the problem, so I can't show you what was happening, but I'll definitely look at these steps if it happens again.
    Thanks!
    Brooke

Maybe you are looking for

  • How do I transfer voice memos from my iPhone to iTunes so it can be viewed offline?

    Hello I am struggling to find a way to transfer and save it on my iTunes (on my iMac) many voice memos (some up to 11 minutes long) and yet I can see the voice memos on iTunes via my plugged in iPhone. But unfortunately cannot find a way to save it o

  • How to move entry from one container to another

    Hi! We are using DBMS_LDAP package to attempt to move an entry from an LDAP container to another container. We have tried modrdn2_s (takes a session, the old dn, the new dn, and a PLS_INTEGER indicating whether or not to delete the old entry; or at l

  • Export Sales Order Cycle for Country-IN

    Hai, Can anyone give me complete sales cycle of "Export sales order" - What extra config settings need to be maintained. It would be more helpful, if anyone gives detailed info including transactions ( eg:LC BOND, Bill of Lading, Creation/Utilization

  • Insufficei​nt Memory

    Hi - using an HP Color LaserJet CP1518ni. Many simply Publisher projects are outputting an error message: Insufficient Memory . Any quick workarounds? This is a recent development -- have been able to print Publisher projects without difficulty in th

  • Line Chart: Make Data Tip Images Always Visible

    What I want to do is simple. I have a line chart, on the lines I want the little image that denotes a data point to always be visible. I don't want the datatip to be always visible, just the little image that you mouseover to show the tip. Surely I'm