Vista glass effect in JFrame

Hi,
I try to get the vista glass effect working in JFrame via calling DwmExtendFrameIntoClientArea over JNI
It basically works but the problem is, that the jrootpane draws an opaque rect over the client area.
So I hacked the jframe a little bit to set my own jrootpane
jf.setRootPane(new JRootPane() {
               public void paint(Graphics g)
                    super.paint(g);
still isn't working. disabling double buffering:
RepaintManager.currentManager(jf).setDoubleBufferingEnabled(false);
works. I now get a wonderful glass background :)
but as soon as i add some other component, like an opaque JPanel to the contentpane, it draws a gray opaque rect over the entrie contentpane (even there where the added component isn't).
I traced it and it happens where the added component draws its background (windows size e.g: 300x300, component bounds: e.g. 20,20,50x50 -> [0,0,300x300] becomes gray and component gets it background color)
Graphics Debug output says that this happens on : D3DFillRect
So my question is: How do I avoid that this gray background iis drawn and it would be cool if it even works with double buffering.
My idea is, that it is maybe related to Sun2dGraphics->surfaceData->(WFramePeer)peer->eraseBackground which is set to false or Sun2dGraphics->surfaceData->(WFramePeer)peer->background which is set to this nice gray color.
Bye,
Thomas

seams to work with GDIpipline and this trick:
JPanel cp = new JPanel(){
public void paint(Graphics g)
Graphics2D g2d = (Graphics2D) g;
Composite oc = g2d.getComposite();
g2d.setComposite(AlphaComposite.Clear);
g2d.fillRect(0, 0, getWidth(), getHeight());
g2d.setComposite(oc);
g2d.setComposite(AlphaComposite.Src);
super.paint(g2d);
cp.setOpaque(false);
jf.setContentPane(cp);but D3Dpipeline still draws it's gray background or a black one with the trick above

Similar Messages

  • HELP! Illustrator CC Stained Glass effect issue

    Hello. I'm relatively new to Illustrator. I'm designing a pair of shorts and have come across a problem. I'm using the stained glass effect to give the shorts a reptile look over a gradient green to black 90 degrees. When I select the stained glass effect, the edges are white and black while the rest of the shorts are the green to black gradient. It's very frustrating why the color gradient does not run to the bleed lines. Can someone please help me? I have created this look in the past using Photoshop and had a bunch of uniforms made up for my customer. I need to make more, but my new supplier cannot use the photoshop file as he needs an editable file in vector. I'm trying to upload the image, but it's not working. The file is 3.6mb. Please help if you can, this is urgent.
    Thank you!
    Anthony

    Stained Glass is a pixel effect, so what's the point of using AI? And even if it wasn't, if there was gradation of some sort your supplier would have to use a printing process based on creating discrete halftones to capture all tones, not sharp contours. Really doesn't make much sense. Either way, make the object with the effect larger and constrain it with a clipping mask. The same would apply for importing a pre-made texture from PS. What you see are simply the edges of the object as AI processes them with all their appearance attributes and then you get all sorts of issues with overprint and such stuff, which is one more reason why using raster effects in AI not necessarily makes sense....
    Mylenium

  • Title: How to give transparency effect to JFrame?

    Hai,
    we are developing stand alone application using java swing. In our application we need to show an image in JFrame. We draw an image in JPanel using JPanel's paintComponent method. Then we place this JPanel into JFrame. The image is having transparent effect. But we are not able to give transparency effect to JFrame so we couldn't see desktop we are seeing only JFrame's background. *{color:#0000ff}How to give transparency effect to JFrame?*
    *{color}*
    Thanks for your help.

    It's not a commited part of the standard API yet, but as of 1.6_10 you can add transparency effects to a window through the use of
    com.sun.awt.AWTUtilitiesI think this was the original article on the release. If you google, you will find many creative ideas that people have come up with using this particular feature.

  • "Glass" Effect Lettering Created In Photoshop Does Not Appear Correctly.

    I have made some "glass" effect transparent titles in Photoshop by putting a normal title over a transparent background, adding an inner glow and bevel and then reducing the Fill Opacity to zero.
    This is how it should look:-
    However, when I import it into FCE/FCP and superimpose it over video the title usually looks solid black - as it did originally before I reduced the Fill Opacity.
    I have tried every combination of Composite mode I can find in FCE/FCP to no avail.
    Is it possible to show it the way it is intended and if so, can anyone suggest where I am going wrong?
    Ian.

    Hi(Bonour)!
    Start with a transparent background in photoshop. Compose your title document (yopu can put a reference layer at bottom of the stack to see how title will appears on your image clip- if so, pay attention to make this backgroud inactive upon exporting) and save in PNG format (this format save the alpha channel-transparency- with your graphic elements).
    Import in FCE, and compose your title over your video clip.
    Use normal composite mode.
    You can also use Boris title or livetype to achieve the same result.
    Michel Boissonneault

  • How to make Tool Strip have a glass effect?

    How to make Tool Strip have a glass effect? Please Help Me As Fast As Possible . Thx .
    Note : Please write as details as Possible because I am new to vb.

    Another possibility extending the Aero Glass effect.
    ToolStrip backcolor has to be transparent.
    Option Strict On
    Imports System.Runtime.InteropServices
    Public Class Form1
    <StructLayout(LayoutKind.Sequential)> _
    Public Structure MARGINS
    Public cxLeftWidth As Integer
    ' width of left border that retains its size
    Public cxRightWidth As Integer
    ' width of right border that retains its size
    Public cyTopHeight As Integer
    ' height of top border that retains its size
    Public cyBottomHeight As Integer
    ' height of bottom border that retains its size
    End Structure
    <DllImport("DwmApi.dll")> _
    Public Shared Function DwmExtendFrameIntoClientArea(hwnd As IntPtr, ByRef pMarInset As MARGINS) As Integer
    End Function
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    Me.Location = New Point(CInt((Screen.PrimaryScreen.WorkingArea.Width / 2) - (Me.Width / 2)), CInt((Screen.PrimaryScreen.WorkingArea.Height / 2) - (Me.Height / 2)))
    Me.TransparencyKey = Color.Silver
    Me.BackColor = Color.Silver
    Dim BordersWidth As Integer = CInt((Me.Width - Me.ClientRectangle.Width) / 2)
    ToolStrip1.BackColor = Color.Transparent
    Try
    Dim margins As New MARGINS()
    margins.cxLeftWidth = BordersWidth
    margins.cxRightWidth = BordersWidth
    margins.cyTopHeight = ToolStrip1.Height
    margins.cyBottomHeight = BordersWidth
    DwmExtendFrameIntoClientArea(Me.Handle, margins)
    Catch ex As Exception
    End Try
    End Sub
    Private Sub Form1_Resize(sender As Object, e As EventArgs) Handles Me.Resize
    Me.Refresh()
    End Sub
    Private Sub Form1_Paint(sender As Object, e As PaintEventArgs) Handles Me.Paint
    Using Brush1 As New SolidBrush(SystemColors.Control)
    e.Graphics.FillRectangle(Brush1, Me.ClientRectangle.Left, Me.ClientRectangle.Top + ToolStrip1.Height, Me.ClientRectangle.Width, Me.ClientRectangle.Height)
    End Using
    End Sub
    End Class
    La vida loca

  • Best settings in Raytrace for glass effect?

    I was wondering what are the best possible settings for the materials in a 3D text layer to make the letters look like glass, under the Raytrace renderer. I managed to achieve a rather decent metallic look with the aid of 3 lights, but the glass effect seems more difficult. For starters, I would like the letters to look like glass but not show so much detail of the other side of the letters, which depending on the angle makes it look like a double layer instead of extruded text. Turning down the Transparency percentage helps with this, but it makes the text look more like metal than glass.
    I've been trying different things all day and I got a bit closer, but nowhere near something that looks real. Here are the settings I'm using:
    Bevel Depth: 3 (the larger the number, the more the text gets fat. It doesn't work like the bevel style in Photoshop.
    Hole Bevel depth: 50
    Extrusion depth: 30 (text size is 300px)
    Casts shadows: On
    Light transmission: 0%
    Accepts shadows: On
    Accepts lights: On
    Ambient: 100%
    Diffuse: 50%
    Specular intensity: 50%
    Specular shininess: 5%
    Metal: 0%
    Reflection intensity: 80%
    Reflection sharpness: 50%
    Reflection rolloff: 0%
    Transparency:100%
    Transparency rolloff: 0%
    Index of refraction: 1.00
    Any suggestions?

    Todd_Kopriva wrote:
    Start with the glass material in John Dickinson's project here:
    http://blogs.adobe.com/toddkopriva/2012/05/free-3d-material-options-pr oject-and-tutorials-for-after-effects-cs6.html
    I finally got a chance to take a look at that project, and it looks amazing, but the glass comps still look too much like a 3D graphic than real glass. Is there a way to make it look more real? For example, I noticed that most effects do not work when the text layer is made 3D. Is there a way to apply a texture to a text layer? I imagine that would help. And another thing that I don't know if it's possible, but I can't seem to find: if the transparency is set to 100% or close, is there a way to blur or diffuse the back of the layer so that it doesn't show lines that are not as perfect as those on the foreground? Text can be confusing to read because the back of the letter is showing through (when text is extruded) and some lines can look double depending on the camera positioning. Think for example of an ice sculpture, where you see a shape that almost looks like glass but you can't see through as if it were glass. Is there a way to achieve that without a 3rd party plugin?

  • Importing 4 Glass Effect Buttons in FLEX from Photoshop?

    Hi,
    I made 4 glass effect buttons in Photoshop CS3, for mouse up,
    over, click and out. I want to use these buttons in FLEX by
    importing them and relate them with these mouse events.
    How do I do that?
    Thanks

    I did figure out a work around to both problems.
    I still use a timer but now I set the constructor to fire every 1 frame. While I have not been able to attach a listener directly to the child movieclips that tells me when the MovieClip reaches the last frame, I did find that I'm able to test for this state without the listener. Each time my Timer calls the listener, I have it check to see if the child in question has reached the last frame or not. If so, I stop the MovieClip. Works great now.
    private var btnMovieClip:MovieClip;
    btnMovieClip.addEventListener(MouseEvent.CLICK, btnMovieClipListener);
    private var btnClicked:String = "";
    public function btnMovieClipListener(event:Event):void {
    if(event.target.name == "myInstance") {
    btnClicked = event.target.name;
    btnMovieClip.gotoAndPlay(0);
    var timer:Timer = new Timer(1);
    timer.start();
    timer.addEventListener(TimerEvent.TIMER, checkFrames);
    private function checkFrames(event:TimerEvent):void {
    if(btnClicked == "myInstance") {
    if(btnMovieClip.currentFrame == btnMovieClip.totalFrames) {
    btnMovieClip.gotoAndStop(0);
    event.target.stop();
    event.target.removeEventListener(TimerEvent.TIMER, checkFrames);

  • Magnifying Glass Effect

    Hey guys,
    In order to highlight text on a specific image, I'm trying to give it "magnifying glass" effect in which I plan to have a "bubble" over the main text in order to make it larger.  If you have any suggestions on how to do this please let me know.
    Dan

    Okay, I tried doing that, however it samples the whole layer.  I copied the part of the image that I want to zoom in on into a new layer but the sphere still acts over the whole layer. How do I center the sphere on just the part of the image I want to be spherized?

  • How to create glass effect??

    hi
    i wish to creat a mobile phone on screen and wish to know if it is possible to produce a glass screen?
    any help would be great
    thank
    martin

    Create an image which shows a glass effect. Then use this image as a transparent texture on a plane which is your glass.

  • Glass effect doesn't work on iphone 4s

    Hi all,
    I've just updated my IPhone 4s to IOS7.0.2
    Instead of the glass effect on folders and dock panel, I just have a plain grey background... Is there any setup or thing to do to get the folders transparency working?
    Cheers

    Howdy BrunoX208,
    Thank you for using Apple Support Communities.
    From what you are describing, it sounds like the Increase Contrast option is turned on. Check in the setting to see if it is turned On. If so, then turn it Off. If not, try turning it off, then back on.
    Increase text contrast on difficult backgrounds when possible. Go to Settings > General > Accessibility and turn on Increase Contrast.
    From: iPhone User Guide
              http://help.apple.com/iphone/7/#/iph73b89c6
    Take care,
    Sterling

  • Glass effect - semi transparent image

    Has anyone seen any tutorials or know how to make an image, say a rectangular image, into a coloured glass effect, semi transparent image.
    I tend to use images as navigation links in sites and am looking at ways to jazz up the look.
    I have had some helpful suggestions on making glass buttons but I'm not getting the hang of doing this with images.
    Thank you.

    Has anyone seen any tutorials or know how to make an image, say a rectangular image, into a coloured glass effect, semi transparent image.
    I tend to use images as navigation links in sites and am looking at ways to jazz up the look.
    I have had some helpful suggestions on making glass buttons but I'm not getting the hang of doing this with images.
    Thank you.

  • Glass effect

    Hi Guys,
    I'm looking to achieve the glass effect using motion. What I mean with that is the effect you see in the Opening Sequence of the NCIS series, or like it is sometimes used on National Geographic. The effect actually looks like a moving piece of glass, which reflects part of a movie / picture on the background.
    I am pretty sure I have seen this in this forum, but I tried to search for 'Fun with glass' or 'CS' but couldn't find the post again.
    Is there anyone here who could tell me how to do it in Motion 2 ? Or maybe have a link to the post where it was described ?
    Thanks a lot in advance,
    Stefaan

    Hi guys,
    Just FYI. I have found a very nice implementation of that effect done by Peter Wiggins. The effect looks very similar to the sample project Thomas sent me, but it has a few nice additioins which really round up the effect nicely. What I liked about the implementation Peter made is that he included borders for the glass square, which make it look way better.
    The effect can be seen on his website at http://peterwiggins.com/motiondownload.htm and it can be purchased from him.
    Apparently there are also a few Free templates available on his site, so go ahead and check it out.
    Regards,
    Stefaan
    PowerMac G5 Dual 2.7 Ghz   Mac OS X (10.4.3)  

  • How 3D glasses effect is implemented (discuss in terms of programming)

    Hi All,
    I want to know how 3D glasses effect is implemented interms of programatically. like , when we apply this effect to some composition....
    1. Is there two cameras created for each view (left and right) in the composition
    2. Is there two files needed for testing 3D glasses
    3. How can we get the two image's pixel data or pixel information from AE SDK
    4. What happen when we set different 3D view (stereo pair, red Green LR, red Blue LR ..etc)
    5. What happen when we change convergence offset
    6. Is there any relation between convergence offset and camera(s)
    and so on. Lets say, if we have to develop this effect, then how can we do it or how can we implement it. Please discuss.

    ehem...
    the 3D glasses effect merely merges two pre-exsiting images into one image, in one of the various methods of presenting a 3D image to the viewer.
    by pre-existing i mean that it's ENTIRELY up to the user to create the two separate images.
    it doesn't create any cameras, nor does it create a 3D depth to a single image.
    the different setting on the 3D glasses effect are merely a choice of a technical way of displaying 3D.
    be it anaglyph, side by side or interlacing.
    the convergence offset changes the distance between the "eyes", and is used to adjust ill-created image pairs.
    there is a relation between camera and the convergence offset.
    if you didn't do the job correctly with the cameras, then you compensate with the offset.
    if you wish to create a "real" 3D-izer effect, you would need to render the comp from two different cameras.
    that was recently discussed here: http://forums.adobe.com/thread/608953?tstart=0
    even doing that doesn't solve the entire problem, as some elements in the comp come from external sources, and are ready made for one camera and not the other. (such as rendered elements from 3D)
    in such a case you'll need two separate comps, each containing the correct source footage, and not just one comp with two different cameras.
    to read the image data from any layer in the comp you should use a layer param along with PF_CHECKOUT_PARAM.
    that will give you the two pre-existing images.
    so now you could just the use existing 3D glasses effect...

  • 3d glasses effect issue

    Hi,
    Long time lurker here.
    I have just realised color difference between left and right on combined image when I use 3d glasses effect (side by side view).
    I'm using split r&l renders from cinema 4d. images looks identical until I use 3d glasses effect.
    when I set up side by side;  the right side always goes a bit darker.
    is it normal ?
    btw. you can check how it looks like
    http://oi40.tinypic.com/ldum9.jpg

    Thank you for your responses, appreciated
    I overlapped left and right frames in photoshop, selected 4 pixel area with selection tool (from yellow) then inverted selection and delete everything except 4 pixels.
    When I separated left and right; I confirmed the difference with the help of the info panel;
    its like r208 g176 b13 vs. r208 g174 b14
    in fact, no issue with over under so I consider it's not about the stereo effect differency.
    In case of display problem I'm going to do this routine with rendered version.
    I'm in little rush right now (thanks to exams) can't deal with it til friday.
    Gonna let you know about how it went.
    Thanks again.

  • Vista Aero Glass Effect in Swing

    Hi,
    How can I make my JFrames transparent like windows media player in vista? Is it possible?

    seams to work with GDIpipline and this trick:
    JPanel cp = new JPanel(){
    public void paint(Graphics g)
    Graphics2D g2d = (Graphics2D) g;
    Composite oc = g2d.getComposite();
    g2d.setComposite(AlphaComposite.Clear);
    g2d.fillRect(0, 0, getWidth(), getHeight());
    g2d.setComposite(oc);
    g2d.setComposite(AlphaComposite.Src);
    super.paint(g2d);
    cp.setOpaque(false);
    jf.setContentPane(cp);but D3Dpipeline still draws it's gray background or a black one with the trick above

Maybe you are looking for

  • Issue in Printing of FBL1N ( Line Item Display)

    Hi, I have an issue with the printing of the report FBL1N... When I execute the report with the Standard Layout "1SAP". The dispaly on the screen is correct. But when I tried print the output the display on the print out, excludes the Last Line item

  • Is it possible to Replace the Mac Mini HD

    I currently have : Intel ICH7-M AHCI: Vendor: Intel Product: ICH7-M AHCI Speed: 1.5 Gigabit Description: AHCI Version 1.10 Supported ST98823AS: Capacity: 74.53 GB Model: ST98823AS Revision: 7.01 Serial Number: 5PK20YQK Native Command Queuing: Yes Que

  • Problem with Adobe Reader vs Acrobat on my Macbook Air

    A question that is addressed in the forum but the answers (so far) have not worked for me: I just switched to a Macbook Air (from a standard Macbook Pro) and suddenly cannot open PDF files from the internet in Adobe Reader. Instead, I am instructed t

  • DMS server error

    Hi All, Iu2019m getting an error in Transaction OAC0 while clicking on the  Test Connection button. The message number is CMS025 (HTTP error: 401 Unauthorized). Pl. help us to resolve the issue as because of that we are not able to use DMS server for

  • Can you replace damaged frames with Adobe Premiere Pro CS6 ?

    Hello everyone! I'm new to Premiere Pro CS6 and don't know all the tricks (no previous experience with video editing). I have a video file that has some damaged frames (it is a VHS-DVD bad quality transferred file). I'm wondering is there is a way to