Need a non rectangular JFrame

Hi,
Does anyone know if its possible to have a GUI which is displayed in a frame which is not rectangular?
I want to have an elliptical Frame to my GUI.
I know its possible in other languages because I have seen a GUI for a media player which is not rectangular at all.
Can anyone please help?
Thanks,
Jim

I understand that in a parallel univers, where everyone live on ships, the most popula operating system is called Portholes 2000, which runs on computers with circular CRTs.
Sadly, we're stuck with rectangular CRTs, Windows, windows and JFrames.

Similar Messages

  • 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

  • How can I count the number of pixels in a non-rectangular selection?

    I need to know the exact number of pixels that I select for a size comparison. It's a non-rectangular selection similar to a cloud.
    I'm using CS2 but could upgrade if needed.

    Thank You
    Michael D. Sutton
    (435) 723-3566
    (435) 720-2878
    [email protected]

  • 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.

  • 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.

  • 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!

  • 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.

  • 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/

  • "Non rectangular objects will not appear correctly when exported using CSS."

    I am using Ind CC 2014 exporting a document to a reflowable epub.  The document contains an .ai image.  The image exports correctly in some parts of the.epub but not others, where it is distorted. There is a warning on export :"Non rectangular objects will not appear correctly when exported using CSS."  Any suggestions appreciated.

    Thanks!
    >
          "Non rectangular objects will not appear correctly when exported
          using CSS."
    created by pooja2087 <https://forums.adobe.com/people/pooja2087> in
    /InDesign EPUB/ - View the full discussion
    <https://forums.adobe.com/message/6886892#6886892>

  • 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 Border?

    Hello,
    Is it possible to use a Border, for example a javax.swing.border.EtchedBorder, to outline a Shape?
    I'm developing some non-rectangular Buttons and would like to be able to use some of the standard Borders with them.
    Thanks,
    Ted Hill

    Hi,
    Were you able to find a solution to your problem?
    I am trying the same on a round JPanel.
    Thanks
    Ashish

  • 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

  • Non main JFrame

    If i wanted to make a non main JFrame what is the basic structure for it to open as a new frame not as an internal frame? How would i call this Frame at an event?

    Sorry been feeling ill and I seem to not write what i mean and not remember things i already know. I meant to take the elements of the JFrame into it but i did it just after you answered with some tweeking anyway. Calling and passing values to it should be done like a normal class construction method. Thanks for helping me out anyway

  • Non Rectangular selection in Tables.. How to?

    HI there,
    Can i select contiguous cells in a tablein a non rectangular fashion.?Ex: I ve a 3X3 table consisting of 1,2,3
    4,5,6
    7,8,9
    Can i select the cells {2,4,5,6,8}..
    Thank You

    Unfortunately, it is a lot of work in order to do this.
    I've already done that and I had to create my own model to keep
    the selections (it must keep a boolean for each cell indicating the selection state) and I had to override all the methods of JTable that
    concern the selection (row and column).
    As the row selection is managed by the JTable and the column selection is managed by the TableColumnModel, it is a bit hard.
    I'm sorry, but I can't post my code because it is a part of a commercial softwware.
    If somebody has a simplest idea!

  • How can I change a decorated JFrame to non-decorated JFrame?

    I want to change a decorated JFrame to a non-decorated JFame. The frame already shown on the screen. How can I do this?

    If I call dispose() and setVisible(), the window ID will be changed. I am working on Linux and need to communicate with other processes by window ID. Is there a method to set a frame decorate without change window ID?

Maybe you are looking for

  • SAP_INFOCUBE_DESIGNS

    I have run the report SAP_INFOCUBE_DESIGNS.  An example of the results for my cube is shown below: SMMCIM1            /BIC/DSMMCIM11      rows:          9    ratio:          7  % SMMCIM1            /BIC/DSMMCIM12      rows:         57    ratio:      

  • Download Error in Apps tab

    It says Download Error when I click on the apps part of my CC widget. I click reload and it still won't go through, and says to contact customer support. I have tried restarting my computer, signing out and back in. Adobe chat was closed. I cannot up

  • Loading an external swf music player

    Hello, my problem is that all the action script contained in the musicplayer.swf seems not to work when I load the whole musicplayer.swf in the main movie.what can I do to resolve this? here is the code:

  • Packaging IDOCs - SAP R3(IDOCs) - XI - Flat File

    Hi, I've got the scenario SAP R3(IDOCs) -> XI -> Flat File. The IDOCs are sent from R3 with the Option Send by Packet. There is 10 Idocs per packet. What I want to do is create one flat file for each packet. So one packet of 10 Idocs must create 1 fl

  • How do I restore saving files processed in RAW to jpg

    I have always processed my camera RAW files from Bridge and saved them to the desktop or a folder as jpg files.  Suddenly I get a message "the file could not be created". Same applies to attempt to save in any format.  Nothing has been changed in set