Draw a border with a transparent shadow

Hi, Is there any way to draw a border that has a shadow below it?
I know that it's possible to use drawline() with a transparent color but it only works fine when the screen is completely repainted.
Help please! becouse i'm going slightly mad...

Y already know the borders in "javax.swing.border" but the idea is to draw popup menus with a transparent shadow on left and bottom sides.
And I'm trying to do it with a border.
An example of this would be menus in Windows XP.

Similar Messages

  • A simple dialog with semi-transparent border (MFC)

    Hi,
    I have to make a image dialog with semi-transparency border in MFC.
    I had web surfing all the day and found this solution in the codeproject.
    http://www.codeproject.com/Articles/42032/Perfect-Semi-transparent-Shaped-Dialogs-with-Stand
    But it creates two dialogs to make a semi-transparent dialog and the mechanism was so complex.
    And the release of the dialog object is difficult so that it may have memory leaks.
    I want a dialog (background is an image) with a semi-transparent border (corner - rounded).
    And I have to make it with only one dialog. If it's possible, how can I do it?
    Please help me, Thank you.

    The child control will become semi-transparency as your dialog.
    Do you want to show some child control on your dialog? If yes, you need the second dialog to host your child control. 
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • I want to draw rounded rectangle with dashed border

    Hello,
    I am working on flex 4.5 air 2.7 . And i want to draw rounded rectangle which has dashed border or solid border as per user's selection. Also rectangle can be rounded or simple. I am able to draw simple rectangle with dashed border. I want a solution for rounded rectangle.
    If anyone have any idea then post as soon as possible..
    Thanks
    Dhwani

    Good day!
    Could you please post a screenshot with the Layers Panel visible?
    Is the iten by any chance a Shape Layer and therefore does have a Vector Mask?
    Regards,
    Pfaffenbichler

  • Xcompgr + urxvt with true transparency no shadows around the window

    hello!
    i have a big problem. i want a terminal with real transparency. making a other terminal transparent with transset is bad, because it makes the whole window transparent, also the borders!
    so i decided to try urxvt. i start urxvt with the following command:
    urxvt -fn "xft:Monospace:pixelsize=11" +sb -depth 32 -fg white -bg rgba:2000/2000/2000/dddd
    it works, the terminal has real transparency, but it has no shadows around the window/terminal. when i start urxvt with a depth of 24, there are shadows but no transparency!
    i'm running e17 with xcompmgr and the following settings:
    xcompmgr -c -f -r4 -t-3 -l-3 -D5 -o 0.7 -d :0.0&
    is there someone who can help me? i hope it!
    mfg iggy
    Last edited by iggy (2007-12-04 11:45:42)

    Actually I do and I have no shadows either - but I wasn't even aware of this issue until you pointed it out.
    But I like it without shadow, using OpenBox here.

  • FEATURE REQUESTS: Border Panel and Transparency slider for bg color

    Some points:
    1) "Color" by itself is a dubious panel name. Color of what? Please use the existing CSS property names wherever possible, and separate out background color and border color.
    2) Transparency sliders need to be enabled for all color pickers everywhere in the UI. RGBA everywhere, always. No hex colors, ever, please. There's just no reason anymore.
    2) Border sides need to be separately tweenable in the UI. I've posted about this before. Here's a bit more detail:  Use a 1-to-4 toggle button at the top of the Borders Panel to go back and forth between a simplified and a four-separate-borders interface. Something similar to what you've done in the Corners Panel. I've mocked up the panel UI below.
    4) Hire me as junior interface designer on this program.

    @Sarah:
    You're right about selecting opacity in the color picker. That's probably cleaner. But it doesn't bother me in the slightest that a border with an alpha is rendered over the background-color. That's CSS. (Just use a bg color of "none" if that's what you need.)
    In response:
    1) Please don't use CSS "outline" for any heavy lifting in Edge. The interoperability problems are currently massive. For one thing, Firefox draws outlines outside of any box-shadow, contrary to the spec. This bug has festered for three years now, and shows no sign of ever being fixed:
    https://bugzilla.mozilla.org/show_bug.cgi?id=480888
    The other big limitation is that outline edges are always square, and can't be rounded. To create what you're calling an "external" border just use a box shadow with no blur. This is a standard practice, and renders well. Whatever you do, please don't make a panel called "borders" that actually creates box-shadows. The answer is education and evangelism, not mislabelling things.
    2) Borders don't change the external dimensions of an element if you use border-box globally. Positioning doesn't get the least bit "out of whack." There shouldn't be any trepidation there. This is probably how Edge should work across the board, for all elements, especially if the math of box-sizing is getting you and your engineering team down For folks who aren't hip to this yet, see this fiddle:
    http://jsfiddle.net/tUVM7/
    and this explanation of the property:
    http://paulirish.com/2012/box-sizing-border-box-ftw/
    Borders and Box-shadow panels need to be in the "frontlog", not the backlog.

  • [Borders] need help to design a transparent shadow

    Hello !
    After a long research about border topic, I have made my own shadow border. To do this I made a panel with a transparent background then I had my border, a gradient of transparent gray color (Color Alpha way).
    I do this because on Swing components the background, where would be drawn the border is always paint. I would like a Cliping Area stopping in Border frame.
    Now I have some problem with this way (a lot of memory consumption), so I would like to use the normal construction way. Must I implement a new class from Component taking care with the border clipping area ??
    The isBorderOpaque method don't seems to do anything; I m on JDK 1.3 & 1.4

    Hi,
    i would prefer to have 3 custom column by this way easy to manage and based on column value can take action.
    i had workflow which has different states so i managed through costim columns.
    thx
    iffi

  • Using Sparkle build in on object with 0% transparency

    I am trying to use the 'Sparkle' build in on an image (and I have also tried with text) with 0% transparency, so that only the effect is visible.  I have done this in the past in a previous Keynote version.  The issue I am having is that the image shows up not transparent once the build is finished. Any thoughts on what I can do to resolve this? My work around so far is to add 'Disappear' build out after the build in is complete.
    Thanks!

    Use a coloured background
    place a shape on the slide and remove any shadow and use any fill colour
    Reduce the opacity to a value of 0

  • Creating a 1 pt. border on a transparent background??

    I'm wondering if there is a simple way to create a 1 pt. border on my transparent background. I want this as a "cutting guide", but my "inside edit/stroke" is not working on the transparent b/g.
    Any help would be appreciated. Thanks!

    On a blank layer:
    Select > All
    Select > Modify > Contract > 1 px
    Invert Selection
    Edit > Fill with the color of your choice.
    It's a bit old school roundabout, but it works.

  • Border with padding for object styles

         Hi,
    I am trying to apply a universal object style in my Indesign CC 14 document. I'd like each image (object, non text) to have a a border with padding. Currently, I know how to apply the border (object styles > stroke > outer fill) and I can get rounded corners and all real nice. But I need that padding between the image and the border.
    As i understand it, I apply the margin through the text style, but how to apply the padding for the border?
    thanks
    matt

    For text frames you use Inset Spacing in Text Frame Options. For images you can make a custom stroke style like this and apply it to the image frame. Here the stroke is from 0 to 25% and the gap is from 25 to 100%. I've applied a 20pt stroke outside aligned, so the stroke is 5 pts and the gap or padding is 15pts. You can then color the gap or leave it transparent:

  • Drawing a Border without insets

    My JTable uses colour, and so I dont want to mess up the information it displays with the standard selection background - at the moment I am experimenting with setting a border on the cell. My problem is that the border shuffles arround the text. The DefaultTableCellRenderer is a JLabel so I figures the same applies (i can make an example if anyone wants).
    Is there a way of drawing a border without insets?
    Edited by: 794057 on 06-Jan-2011 02:32
    forgot to change title to something sensible

    Thanks alot! I used empty borders to "pad out" the cell so the text didnt jump down when a border was only at the top of the cell. If anyone is interested here is an example showing what I did and how the box-selecting worked:
    import java.awt.*;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import javax.swing.*;
    import javax.swing.border.Border;
    import javax.swing.border.CompoundBorder;
    import javax.swing.border.EmptyBorder;
    import javax.swing.border.MatteBorder;
    import javax.swing.table.TableCellRenderer;
    import javax.swing.table.TableModel;
    import saiman.quantgcms.CompoundSetupList;
    import saiman.uiobjnew.JayComboBox;
    public class Test {
        public static void main(String[] args) {
            EventQueue.invokeLater(new Runnable() {
                public void run() {
                    final JFrame frame = new JFrame("Test");
                    frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
                    String[] columnNames = {"First Name",
                            "Last Name",
                            "Sport",
                            "# of Years",
                            "Vegetarian"};
                    Object[][] data = {
                             {"Kathy", "Smith",
                                 "Snowboarding", "52", "fasasd"},
                                {"John", "Doe",
                                 "Rowing", "52", "fasasd"},
                                {"Sue", "Black",
                                 "Knitting", "12", "something"},
                                {"Jane", "White",
                                 "Speed reading", "522", "true!"},
                                {"Joe", "Brown",
                                 "Pool", "524", "fasasd"},
                        JTable table = new JTable(data, columnNames) {
                             private static final long serialVersionUID = 1L;
                             int thickness = CompoundSetupList.getBorderThickness();
                             Color borderColor = CompoundSetupList.getBorderColor();
                             private Border left = new MatteBorder(0, thickness, 0, 0,borderColor);
                            private Border right = new MatteBorder(0, 0, 0, thickness,borderColor);
                            private Border top = new MatteBorder(thickness, 0, 0, 0,borderColor);
                            private Border bottom = new MatteBorder(0, 0, thickness, 0,borderColor);
                            private Border topBottom = new MatteBorder(thickness, 0, thickness, 0,borderColor);
                            private Border emptyTopSpacer = new EmptyBorder(thickness,0,0,0);
                            private Border emptyBottomSpacer = new EmptyBorder(0,0,thickness,0);
                            private Border emptyTopBottomSpacer = new EmptyBorder(thickness,0,thickness,0);
                            private Border Open = emptyTopBottomSpacer;
                            private Border Top = new CompoundBorder(top, emptyBottomSpacer);
                            private Border Bottom = new CompoundBorder(emptyTopSpacer, bottom);
                            private Border Both = topBottom;
                            private Border leftOpen = new CompoundBorder(left,Open);
                            private Border leftTop = new CompoundBorder(left,Top);
                            private Border leftBottom = new CompoundBorder(left,Bottom);
                            private Border leftBoth = new CompoundBorder(left,Both);
                            private Border rightOpen = new CompoundBorder(right,Open);
                            private Border rightTop = new CompoundBorder(right,Top);
                            private Border rightBottom = new CompoundBorder(right,Bottom);
                            private Border rightBoth = new CompoundBorder(right,Both);
                          @Override
                          public Component prepareRenderer(TableCellRenderer renderer, int row, int column) {
                              Component comp = super.prepareRenderer(renderer, row, column);
                              JComponent jc = (JComponent) comp;
                              comp.setBackground(row % 2 == 0 ? getBackground() : Color.pink);
                              if (!isRowSelected(row)) {
                                  int modelRow = convertRowIndexToModel(row);
                                  String type = (String) getModel().getValueAt(modelRow, column);
                                  comp.setForeground(Color.black);
                                  if (type.equals("SomeString")) {
                                      comp.setBackground(Color.orange);
                                  } else if (type.equals("SomeString")) {
                                      comp.setBackground(Color.red);
                                  } else {
                                      comp.setBackground(row % 2 == 0 ? getBackground() : Color.pink);
                                  jc.setBorder(BorderFactory.createEmptyBorder());
                                  //centerTable.convertRowIndexToView(0);
                              } else {
                                  int[] selectedRows = getSelectedRows();
                                      boolean top = true;
                                      boolean bottom = true;
                                      if (contains(selectedRows, row-1))
                                           top = false;
                                      if (contains(selectedRows, row+1))
                                           bottom = false;
                                      if (column == 0)
                                           if (top && bottom)
                                                jc.setBorder(leftBoth);
                                           } else if (top) {
                                                jc.setBorder(leftTop);
                                           } else if (bottom) {
                                                jc.setBorder(leftBottom);
                                           } else {
                                                jc.setBorder(leftOpen);
                                      else if (column == getColumnCount()-1)
                                           if (top && bottom)
                                                jc.setBorder(rightBoth);
                                           } else if (top) {
                                                jc.setBorder(rightTop);
                                           } else if (bottom) {
                                                jc.setBorder(rightBottom);
                                           } else {
                                                jc.setBorder(rightOpen);
                                      else
                                           if (top && bottom)
                                                jc.setBorder(Both);
                                           } else if (top) {
                                                jc.setBorder(Top);
                                           } else if (bottom) {
                                                jc.setBorder(Bottom);
                                           } else {
                                                jc.setBorder(Open);
                              return comp;
                          private boolean contains(int[] selectedRows, int i)
                                 for (int selected : selectedRows)
                                      if (selected == i)
                                           return true;
                                 return false;
                        table.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
                    frame.getContentPane().add(table,
                            BorderLayout.PAGE_START);
                    frame.pack();
                    frame.setLocationRelativeTo(null);
                    frame.setVisible(true);
    }

  • How do I import animated gifs into Premiere with a transparent background?

    I have an animated gif that I got from the internet, and I'm trying to import it into Premiere Pro with a transparent background. The gif is of a video game character standing still and blinking. Whenever I import it, it always has a white background, so I need help on how to change that.
    I've gone into Photoshop and removed the white background frame by frame, making it transparent. I do this by using the magic wand tool to select the white background, then hit "delete" to turn it into that diamond grid, which means it's transparent. I then select File -> Save for Web. I preview every frame, and it shows that the backgrounds are transparent. I save it as a gif. But when I import it into Premiere Pro, the white background is still there.
    I've read many forums online about people trying to import images into Premiere Pro with a transparent background, but none of them have explained how to do it specifically for animated gifs. Every answer has always been "export the image as a png, that'll work", and sure enough, I exported a few frames of the gif as pngs, and those few frames had transparent backgrounds in Premiere Pro. But I don't want a png because those aren't animated sequences, those can only be still images. I need to export it as a gif so that it will remain animated, but gif files always have that dreaded white background in Premiere Pro.
    I suppose I could export every frame as a png, import each of those frames into Premiere Pro, then string all the frames together and tweak them so they'll be functionally identical to the animated gif, but that would take forever. I'm making a video project and I need numerous animated gifs to work with, so I don't want to do that with every single one of them. I'm looking for a way to simply import the gifs into Premiere Pro and be done with it. If there is any way to do this, please help me.
    -Robert

    faind on gif transparency and other cartoon animation problems : Adobe After Effects
    " The reason: GIFs don't support alpha channels. Instead, their file structure assigns a certain color value to be read as totally transparent. There aren't any degrees of transparency as you find in graphics formats that do support alpha channels.
    To use an animated gif in AE, you'd first have to create the areas of transparency, then convert the series of images into a graphics format that supports alpha channels, and there are a bunch: PICT, TIFF, TARGA or PNG, to name a few."

  • How do I export a keynote slide to pdf with a transparent background?

    I use Keynote for creating figures for a report I'm currently writing and layouting in Adobe InDesign.
    Unfortunately I have run in to a quite annoying problem.
    Because of the page-layout and background graphics in my main report, I need to be able to export the figures without the white background which comes as standard. I tried to remove the background in "Master & layout" (my Keynote is in Danish, not sure if it's called the same in English), which is suggested to bring background transparency when exporting to Quicktime movies. I doesn't seem to have any effect when exporting to pdf though.
    When importing the pdf's into InDesign the figures comes up with a white background instead of the wanted transparent.
    My choice of pdf over png is because of the vector graphics.
    Is it possible to export to pdf's with a transparent background?

    One option would be to export the slides as image files and bring them in Pages in that format.
    From the top menu bar:
    Share > Export > Images

  • Transparent shadow crossing over the image in pdf output

    Hi Folks,
    In recent days, we are frequently facing problem in using of tiff format image in InDesign. In pdf output, there is some transparent shadow crossing over the image. The problem occurs in ps to pdf as well as export pdf settings. The issue was not happened for the past 5 years.
    If it is a reproducible error, we could find the root cause of the problem. But the same issue does not occur if we create the pdf again. Please see below the differences in viewing of actual image & problematic image and suggest how to resolve this and why it happens.
    Issue 1:
    Actual view of image shown in left side; Corrupted view of image shown in right side
    Issue 2:
    Issue 3:
    Now I have suggested my team to convert all tiff images to psd image format. I really don't know whether it helps. All I need is to know the root cause of the issue. Anybody please suggest would be really helpful.

    @Tyson:
    In Issue 2, horizontal green color shading is crossing above the play/pause icon in right hand side of the image.
    In Issue 3, I have displayed the screenshot of the image placed in InDesign to show the original view of the image. But the problem shows in right hand side that is pdf output view. You can see the horizontal green color shading in 1st image and light grey color shading (at the top of "NO" text) in 2nd image.
    Actual & Effective PPi of top of the image --> 597
    Actual & Eff. PPI of bottom of the image --> 477
    PS to pdf creation:
    Crops & bleeds ON, Composite CMYK color output, Image data: All, Postscript: Level3, Data format: Binary, Printer profile: Document CYMK-US. web coated
    If you need more details, I'm ready to give you. Please let me know.

  • HT1338 Updated my imac from 10.6 to 10.8.2 recently. My iphoto logo in my Dock has been replaced with a transparent "question mark" and I can no longer access my iPhotos... please help!!  Mark Howell

    Why can I no longer find my iphotos?  Updated from 10.6 to 10.8.2 recently... The iphoto logo in my dock has been replaced with a transparent, grey, question mark... why? How do I restore my iphotos?  Searched for them in Finder, and in "search"... they appear as text only.. but no photos.. please help.. Mark

    Have you verified that the iPhoto applications is not in the Applications folder or somewhere else on the hard drive? 
    To do so download and use  Find Any File to search for "iPhoto.app" because FAF can search areas that Spotlight can't.  If the application is somewhere else on the HD FAF will find it.  However, I doubt that it will be there but it's worth a search. 
    OT

  • Problem with image transparency in Director

    We want to use some Photoshop images with some transparency and gradients
    (ie foreground color to transparent background) in a project where the image
    will be placed over various other background images (the background images
    will show through the transparenct areas).
    When we import the file (in p/shop format - selected as 32 bit),and it's
    placed onto the stage the "transparent" areas of the image are not fully transparent
    - there is a slight 'lightening' of the pixels in the transparent areas (this doesn't show
    up when the image is viewed in Photoshop)
    Can anyone explain what is happening here?

    What happens if you save as PNG out of PS and import that?

Maybe you are looking for

  • How the **** do you reset the security questions? And how do you add a backed up library to a new computer?

    So I have a couple issues and I am extremely frustrated, I'm about to smash all of my apple products. First issue is how do you reset the security questions? Can't seem to find the "forgot answer" of anything like that. Second is my old comp crashed

  • ICal events missing and wrong

    I use iCal on my Mac and Calendar on my iPhone all synced with MobileMe CalDav. I have a lot of recurring events. Everything looks fine until October 2011. Almost the entire month is blank in iCal on the Mac. I know there should be events during the

  • REP-56055: ''Exceed Max Connections Allowed:''

    dear gurus salamz can any one help me on this we have bi, app server with 10g2 and getting on few reports this error rgds, salim shahzad

  • How to make preceding reference mandatory

    Hi gurus, could you please help in the following question. It's necessary to make impossible creation of operation (for example Sales order) without reference to a preceding document (another Sales order). There are fields in Definition of Item Categ

  • SQL to search a field in the complete database

    Hi, I would like to know whether is it possible to search for a particular field name from the complete database? Say, for example, I would like to search for the field value 'oxford' present anywhere in the database and in any of the tables and in a