Urgent!Java Frame Cutting according to non-rectangular image (Transparency

Urgent-Java Frame Cutting according to non-rectangular image (CrossPlatform - Transparency)
hi, i want to make the frame transparent in order to make a skin like Windows Media Player . skin is non-rectangular how should i make the frame transparent i am using the JWindow as the container. Plz guide me any idea. as an example i have a JWindow i put a non-rectangular image on it via Jlabel . now i want to make the edges of JWindow outside the boundery of the image transparent ... so that my frame seems like a non-rectanguar image . How i do that? But i need a cross platform kinna thing in java especially for windows/mac/linux
PaulFMendler :: thanks for ur help i looked at the code but it seems to be windows dependent. i need cross-platform way of producing abt effects. please contact me even on my email >> [email protected]
Waiting ......

Check out the link shown below:
http://forum.java.sun.com/thread.jsp?forum=4&thread=391403
The posted code has slight problem when moving the JWindow around but you can get a pretty good idea on what has to be done.
;o)
V.V.

Similar Messages

  • Non-rectangular or transparent images

    Hi.
    Not using Swing, can I use non-rectangular images for animation purposes ?
    Alternatively, can I use rectangular images with a "transparent" color as a background ?
    If so - How ?!
    Thanks.

    GIF98a images can have a mask (transparent) color set. Otherwise, set the 'alpha' component of pixels that use your chosen mask color.
    http://tutorials.findtutorials.com/read/id/111

  • Cropping non-rectangular image

    Hello,
    I need to crop  a slightly non-rectangular, four-sided image (a photo of a picture in a frame) and end up with a rectangular image. I've tried cropping and lassoing but nothing seems to do the job. Most grateful if anyone can tell me how I might do this on PSE.
    Thanks
    Michael

    Witteboomen wrote:
    Plse excuse Dunn question, Michel, but what is ACR?
    Best
    Michael
    ACR (Adobe Camera Raw) is the module of PSE which is used to first convert raw images so that they can be read and edited in the Editor.
    This module can also be used to open jpeg files:
    In the Editor, menu /File/Open As
    you select a jpeg picture and in the line'Open As', just under where you enter the file name, you must choose the 3rd option :
    Camera raw...
    This opens a new dialog window in which you can do the main edits to your image by adjusting a few sliders.
    Of course, raw file will benefit more from being processed in ACR, but it's also interesting for jpegs.
    How can editing through ACR be a 'non destructive' process ?
    It's because the principle of ACR (also used in Photoshop CS) is to store all editing commands and settings separately from the original picture data which are never changed. In the case of jpegs, the settings are stored in the metadata section of the jpeg file (where the camera name and settings are kept) without changing anything in the way pixels are represented. The 'recipe' is stored, but the pixels stay unchanged. When you straighten and crop, if you click 'Done', the settings are saved. If you want to do some editing or print your file, you click 'Open' and the result of your edits in ACR is opened in the Editor.  If you do changes in the editor, of course, those edits will be 'destructive' (as usual in the Editor)  so that you'll have to save the file with another name to keep the original. If you do no edits in the Editor,  but only print or convert the file to another format, the original picture data is not changed.
    In that last case, you don't need to re-open the picture with 'Open As', the Editor will know the picture has to be opened in the ACR module with the usual 'Open'. But it you want to re-open the same picture in another application like Picasa, the Adobe editing data will be ignored and you'll see the original version.

  • Very urgent - java frame ticker in the taskbar

    hi all ,
    i want a typical feature.i am using UI frame(window) for my application.when i put a task in the UI running and minimize in the taskbar.the window should glow(ticker like real player)indicating that some task is running in the window and it is active.it is helpful if u give general that when i minimize the window that should glow(ticker)indicating that it is active in the taskbar.
    regards
    harinath

    There was a post about this is very long time agop. My idea was to change the setTitle function.
    In the task bar, the button takes the frame's title as label, So, if you change the title, it will be displaying in the tackbar icon. Simply override the setTitle() method and provide if a Thread to change the appearance of the title. Thi is like a loop changing the title displayed.
    "this task is running"
    "his task is running"
    "is task is running"
    "s task is running"
    " task is running"
    hope this helps
    vincent

  • Non-rectangular image cells

    Can the image cells in the print module only be rectangular in shape?
    I thought about doing diagonal slices for a series om images, but came up short in trying to create one.

    Witteboomen wrote:
    Plse excuse Dunn question, Michel, but what is ACR?
    Best
    Michael
    ACR (Adobe Camera Raw) is the module of PSE which is used to first convert raw images so that they can be read and edited in the Editor.
    This module can also be used to open jpeg files:
    In the Editor, menu /File/Open As
    you select a jpeg picture and in the line'Open As', just under where you enter the file name, you must choose the 3rd option :
    Camera raw...
    This opens a new dialog window in which you can do the main edits to your image by adjusting a few sliders.
    Of course, raw file will benefit more from being processed in ACR, but it's also interesting for jpegs.
    How can editing through ACR be a 'non destructive' process ?
    It's because the principle of ACR (also used in Photoshop CS) is to store all editing commands and settings separately from the original picture data which are never changed. In the case of jpegs, the settings are stored in the metadata section of the jpeg file (where the camera name and settings are kept) without changing anything in the way pixels are represented. The 'recipe' is stored, but the pixels stay unchanged. When you straighten and crop, if you click 'Done', the settings are saved. If you want to do some editing or print your file, you click 'Open' and the result of your edits in ACR is opened in the Editor.  If you do changes in the editor, of course, those edits will be 'destructive' (as usual in the Editor)  so that you'll have to save the file with another name to keep the original. If you do no edits in the Editor,  but only print or convert the file to another format, the original picture data is not changed.
    In that last case, you don't need to re-open the picture with 'Open As', the Editor will know the picture has to be opened in the ACR module with the usual 'Open'. But it you want to re-open the same picture in another application like Picasa, the Adobe editing data will be ignored and you'll see the original version.

  • Using non-rectangular images

    hii,
    i am a new-B.
    please tell me how can i use nonrectangular images like balls in my application.

    Whilst images are rectangular, pixels can be transparent, and clipping can
    limit the parts of an image you render.

  • Non-Rectangular Buttons with images

    is it possible to create a non-square "button" in flash cs4
    programmatically using as3?
    Using a xml document, i'm trying to be able to retrieve a
    .png file with transparency, and have said transparent area's be
    not clickable.
    Long story short, I'm creating a map with a bunch of
    clickable areas. These areas are non-rectangular and I need them to
    not obscure other area's which would be in their rectangle. I need
    this to be done programmatically since the area's are going to be
    dynamic as is the data attached to them.
    fyi: I have a fairly good grasp of OOP, so don't be afraid to
    post up complex instructions.

    Now we're cooking with gas! Thank you so much for your
    assistance!
    The only issue left;
    is it possible for the Events to penetrate through, so that
    if two elements slightly overlap, the transparent part of obj1 will
    allow a onclick (and subsequently the onmouseover) event on el2,
    preferably dynamically so that I don't have to add event handlers
    between the two.
    Is there a simple way or do i need to calculate the overlap
    using the x/y coords and width/height of each element, then
    manually dispatch?
    here's where I'm at thus far (with this discussion)
    Firstly, the class for the movie clip,
    then our frame.

  • Non-rectangular click area?

    I have a map that contains several areas, which have
    irregular shapes, i.e., they all have non-rectangular contours.
    Each such area is a movie clip, made from a transparent gif. Any
    part outside of this area (non-rectangular contour) is transparent.
    I have onRollOver and onRollOut event handler to process when
    a mouse moves in or out of an area. But it seems that a "in" only
    happens when mouse actually moves into the rectangle that enclose
    an area and "out" only happens when mouse actually moves out that
    rectangle.
    So, how to make these events handle this non-rectangular
    shapes? Thanks!

    quote:
    Originally posted by:
    Newsgroup User
    If you're making an what's usually called an "invisible
    button," then all you need is artwork in the Hit frame only. If you
    only have shapes (or whatever) in the Hit frame, then the button
    symbol will be invisible at runtime, and will show as a teal
    preview in the authoring environment.
    The MovieCip.hitArea property is a property of the MovieClip
    class, which defines the functionality for all movie clips. The
    Button class does not feature such a property, so if you want to
    use it, you'll have to use
    movie clip symbols.
    David Stiller
    Adobe Community Expert
    Dev blog,
    http://www.quip.net/blog/
    "Luck is the residue of good design."
    Thanks! Words convey knowledge.
    After reading your reply twice, in fact, from thinking too
    hard to make the whole thing work based on those GIF-derived movie
    clips, I just realized that I should've created the clips directly
    from vector images.
    Now, for each area's gif bitmap, I converted it into vector
    first and then converted it into a movie clip symbol. In this way,
    no special codes need to be used and it is more straightforward.
    So, I guess one big wrong assumption I've made until now is
    that converting a GIF directly into a movie clip should
    automatically include a step to make the bitmap vector image.
    Thanks all for your help!

  • Non rectangular windows using Swing

    Hi everybody
    I've been trying to create a non rectangular window (i.e. an oval window) subclassing javax.swing.JWindow but even though the drawing of the inside of the window works correctly, the problem is with the outer part, which is painted anyway using the background color while I'd like to have it
    transparent so to simulate a real oval window.
    i.e. I'd like to have something like (dots are just fillings to give the drawing some shape):
    |. Transparent background...|
    | ..... ----------------------- .......... |
    | .... / Window ............... \ ....... |
    | .... \ contents .............. / ....... | <--- Window's bounds
    | ..... ----------------------- .......... |
    |_____________________|
    Any idea about how to prevent the background from being painted??
    Thanks in advance
    andrea

    Here is what I have done to overcome a similar problem.
    These two classes help me show a 'Bubble' popup similar to what Windows XP have
    You can tweak it like you want.
    /* Subclass of Window to show the Bubbles */
    public class WindowBubble extends Window{
    public WindowBubble(Frame owner, String text, Point startingPoint){
    super(owner);
    JBubble bubble = new JBubble(text, startingPoint);
    setLocation(startingPoint);
    add(bubble);
    pack();
    /* This code is based on SUN's examples of how to create Oval-Components */
    public class JBubble extends JLabel {
    int capWidth = 30;
    Point start;
    String label;
    BufferedImage image;
    public JBubble() {
    this("", null);
    public JBubble(String label, Point p) {
    this.label = label;
    start=p;
    try {
    Robot r = new Robot();
    image = r.createScreenCapture(new Rectangle(start.x,start.y, getPreferredSize().width, getPreferredSize().height));
    }catch(Exception e){
    e.printStackTrace();
    this.setHorizontalAlignment(JLabel.CENTER );
    public String getLabel() {
    return label;
    public void setLabel(String label) {
    this.label = label;
    invalidate();
    repaint();
    public void paint(Graphics g) {
    int width = getSize().width - 1;
    int height = getSize().height - 1;
    g.drawImage(image,0,0,this);
    Color interior;
    interior = (Color)UIManager.get("ToolTip.background") ;
    // ***** paint the interior of the button
    g.setColor(interior);
    // left cap
    g.fillArc(0, 0, // start
    capWidth, height, // size
    90, 180); // angle
    // right cap
    g.fillArc(width - capWidth, 0, // start
    capWidth, height, // size
    270, 180); // angle
    // inner rectangle
    g.fillRect(capWidth/2, 0, width - capWidth, height);
    // ***** highlight the perimeter of the button
    // draw upper and lower highlight lines
    g.setColor(Color.black);
    g.drawLine(capWidth/2, 0, width - capWidth/2, 0);
    g.drawLine(capWidth/2, height, width - capWidth/2, height);
    // upper arc left cap
    g.drawArc(0, 0, // start
    capWidth, height, // size
    90, 180-40 // angle
    // lower arc left cap
    g.drawArc(0, 0, // start
    capWidth, height, // size
    270-40, 40 // angle
    // upper arc right cap
    g.drawArc(width - capWidth, 0,// start
    capWidth, height, // size
    90-40, 40 // angle
    // lower arc right cap
    g.drawArc(width - capWidth, 0, // start
    capWidth, height, // size
    270, 180-40 // angle
    // ***** draw the label centered in the button
    Font f = getFont(); if(f != null) {
    FontMetrics fm =
    getFontMetrics(getFont());
    g.setColor(getForeground());
    g.drawString(label, width/2 - fm.stringWidth(label)/2, height/2 + fm.getHeight()/2 - fm.getMaxDescent() );
    public Dimension getPreferredSize() {
    Font f = getFont();
    if(f != null) {
    FontMetrics fm = getFontMetrics(getFont());
    return new Dimension(fm.stringWidth(label) + capWidth*2, fm.getHeight() + 10);
    } else {
    return new Dimension(100, 50);
    public Dimension getMinimumSize() {
    return new Dimension(100, 50);

  • Non-Rectangular JFrames using JNA or IBM IFrame

    Hi,
    I want to make a non-rectangular frame with round-shaped edges. I searched through this forum. But still unsuccessful. I can even go for a platform dependent solution. But i don't want to use Robot class which is taking screen-captures at interval or at system-events. This approach is very slower and faulty. Is anybody having experience in using JNA or IBM IFrame libraries (or any other approach) for this purpose?
    Thanks in advance,
    Sunil

  • The Java VM terminated with a non-zero exit code.

    Hi,expert,
    I have got this error when I am trying to restart the sap Instance use
    command STARTSAP,
    The error log as below:
    ERROR => The Java VM terminated with a non-zero exit code.
    Please see SAP Note 940893 , section 'J2EE Engine exit codes'
    for additional information and trouble shooting.
    trc file: "/usr/sap/J2E/JC00/work/dev_jcontrol", trc level: 1,
    release: "640"
    ERROR => can't retrieve client list (rc=24) [jcntrms_mt.c960]
    May 21, 2010 12:53:14... com.sap.engine.core.Framework [SAP
    J2EE Engi
    ne|MS Socket Listener] Fatal: Critical shutdown was invoked. Reason is:
    Exiting
    Listener Loop. This requires a restart of the node. Possible reason is
    an interr
    upted reconnect session to the message server.
    Thanks and Best regards,
    Michael

    Hi Michael,
    I am also facing the same issue, can you please let me know where to find the ms.hostname and enqu.hostname...It's very urgent.
    Thanks in advance..
    Regards,
    Krishna.M

  • Non-rectangular windows

    The issue is old and I know it is a very strong need of the Java community. That is:
    "Can I have non-rectangular windows in a Java application?"
    By non-rectangular windows I mean windows like those in WinAmp or RealOne skins, which have round edges and have all of the transparent areas below them working and active.
    In http://developer.java.sun.com/developer/bugParade/bugs/4479178.html it is stated that this will be fixed in Tiger release in 2004.
    Can anyone please give me any information about this?
    I believe a workaround would be to use Eclipse SWT, but I would prefer to stick to standard Java libraries. Is it possible?

    See this article:
    http://www.ibm.com/developerworks/java/library/j-iframe/

  • How can  we see the desktop through a java frame by using JNI?

    How to make a java frame transparent( so that we can see the desktop through it) by JNI? I have seen some code to take a snapshot of the desktop. But is there any code so that the desktop is fully or partially visible through a frame?
    laks

    Please take your time to write full words: "you" instead of "u", "your" instead of "ur". It makes your posts a lot easier to read, especially for those of us who don't have English as their native language.
    You can not really "modify" the behaviour of a method by using a proxy, but you can create a proxy, direct all but one method to the original method and provide a separate implementation for the target method.
    This way you'll have two objects with the same interface (not only in the Java sense, but all methods look the same), but differing behaviour: the original object and the proxy.
    Now if you pass around the proxy instead of the original object, then it'll look as if you changed the behaviour of your object.

  • "Capturing drop-frame media into a non-drop frame clip" error message

    I've logged tapes from what will partly be a 3-camera multi-clip project, and have begun to batch capture.
    Logged all but one tape some weeks ago, and captured one tape at the time.
    Went to batch capture the balance, today. First tape capture went fine. On trying to capture the next tape in the batch I'm getting this message as FCP begins the process:
    WARNING: You are about to capture drop-frame media to a non drop-frame clip. If you proceed, you may experience changes in logged in and out points, problems relinking media, or removal of master clip relationships.
    In analyzing the situation, the only reason I can think of for the error message is that some of the reels were logged on a DSR-11 that had been set to NON drop-frame, and for which I didn't have the remote control to change the setting.
    I haven't run into this while capturing other clips, but those may have been captured via a different deck that does only drop-frame.
    So, I'm looking at next steps:
    1: Capture anyway and possibly regret that I did that.
    (One person on another list reported the same problem, that he had ignored it without any obvious complications.)
    2: Relog all the problem clips using my current deck, speeding up the process by using the "go to" window to drive the tape to the existing in and out points and then marking i/o's...
    Or...
    Suggestions?
    Thanks,
    Ted.

    We've been seeing this stupid error message since v3 and it's never mattered in the slightest. It is always incorrect, anyway. The clips are always drop and the sequences are always drop. It's an FCP programming glitch/bug/screwup. Someday they may or may not fix the mechanism that triggers the warning.
    bogiesan

  • Is it possible to load a non-standard image using some Java API?

    Hi,
    My "problem" is:
    1. I have an image called "mediterranean_sea.IMG" (non-standard image format)
    2. I need to process it (histogram, palette, etc).
    3. I'm wondering if it is possible to load this image an process it using some Java API.
    4. I've tried to do this using JAI but I think that this API only works with TIFF, PNG, JPEG, etc.
    Any idea?
    Thanks in advance,
    Roger

    [url http://forum.java.sun.com/thread.jsp?thread=468188&forum=31]Cross-post

Maybe you are looking for