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);

Similar Messages

  • Diplaying non-rectangular windows using java.

    I am seeking some information regarding rendering of irregular shaped windows using java. Would like to know if its possible to achieve that using only java, if not then which tool can be used, so that my application can be used across platforms. I have gathered some information but most of the tools are not platform independent, most are useful only for windows, there is no mention of whether the tools will be helpful in UNIX etc. environment.
    Awaiting reply,
    Shweta.

    hi,
    you can create a component you like.you must override the paint method
    and paint the component itself. the Graphics Object in paint give you some methods to paint lines,areas and colors.
    the example paint a clock :
    import java.awt.Container;
    import java.util.Calendar;
    import java.awt.Graphics;
    import java.awt.Color;
    import java.awt.event.WindowListener;
    import java.awt.event.ActionListener;
    import java.awt.event.WindowEvent;
    import java.awt.event.ActionEvent;
    import javax.swing.Timer;
    import java.awt.Label;
    import java.util.TimeZone;
    import java.util.SimpleTimeZone;
    public class Uhr extends java.awt.Frame implements WindowListener,ActionListener
    //{{DECLARE_CONTROLS
    Calendar cal=null;
    int sec;
    int minute;
    int hour;
    double Rh,Rm,Rs;
    int nullx,nully,mx,my,Rk;
    Timer timer=null;
    Label lab=null;
    public Uhr()
    super();
    //{{INIT_CONTROLS
    setSize(200,200);
    setLayout(null);
    setTitle("Pit-Timer");
    cal=Calendar.getInstance();
    TimeZone tz = TimeZone.getDefault();//new SimpleTimeZone(1,"GMT");//;
    // String [] tza=new String[128];
    // tza=TimeZone.getAvailableIDs();
    // for (int i=0;i<tza.length;i++)
    // System.out.println(tza);
    cal.setTimeZone(tz);
    sec=cal.get(Calendar.SECOND);//0..59
    minute=cal.get(Calendar.MINUTE); //0..59
    hour=cal.get(Calendar.HOUR_OF_DAY);//0..23
    lab=new Label("Time");
    lab.setBounds(20,170,180,25);
    add(lab);
    addWindowListener(this);
    timer=new Timer(1000,this);
    timer.setRepeats(true);
    timer.start();
    Rk=getSize().width/2;
    Rs=Rk*0.9;
    Rm=Rk*0.8;
    Rh=Rk*0.6;
    mx=getSize().width/2;
    my=getSize().height/2;
    public static void main(String[] args)
    (new Uhr()).setVisible(true);
    public void paint(Graphics gr)
    //zeichnen Hintergrund
    gr.setColor(Color.red);
    gr.fillArc(mx-Rk/2, my-Rk/2,Rk, Rk, 0, 360);
    //zeichnen Stundenskala
    gr.setColor(Color.darkGray);
    for (double alpha=0;alpha<Math.PI*2;alpha+=Math.PI/6)
    gr.drawLine( mx+(new Double (Rk/2*Math.cos(alpha))).intValue(),
    my+(new Double (Rk/2*Math.sin(alpha))).intValue(),
    mx+(new Double (Rm/2*Math.cos(alpha))).intValue(),
    my+(new Double (Rm/2*Math.sin(alpha))).intValue());
    sekunde(gr);
    minute(gr);
    stunde(gr);
    super.paint(gr);
    public void sekunde(Graphics gr)
    double alpha;
    int x,y;
    gr.setColor(Color.blue);
    alpha=(Math.PI/30*(sec-15));
    x=(new Double (Rs/2*Math.cos(alpha))).intValue();
    y=(new Double (Rs/2*Math.sin(alpha))).intValue();
    gr.drawLine(mx,my,mx+x,my+y);
    public void minute(Graphics gr)
    double alpha;
    int x,y;
    gr.setColor(Color.green);
    alpha=(Math.PI/30*(minute-15));
    x=(new Double (Rm/2*Math.cos(alpha))).intValue();
    y=(new Double (Rm/2*Math.sin(alpha))).intValue();
    gr.drawLine(mx,my,mx+x,my+y);
    public void stunde(Graphics gr)
    double alpha;
    int x,y;
    gr.setColor(Color.yellow);
    alpha=(Math.PI/6*(hour-3));
    x=(new Double (Rh/2*Math.cos(alpha))).intValue();
    y=(new Double (Rh/2*Math.sin(alpha))).intValue();
    gr.drawLine(mx,my,mx+x,my+y);
    public void actionPerformed(ActionEvent e)
    if (e.getSource()==timer)
    sec++;
    lab.setText("Time : "+new Integer(hour).toString()+":"+new Integer(minute).toString()+":"+
    new Integer(sec).toString());
    if (sec==60)
    sec=0;
    minute++;
    if (minute==60)
    minute=0;
    hour++;
    if (hour==24)
    hour=0;
    repaint();
    public void windowActivated(WindowEvent e){}
    //Invoked when a window is activated.
    public void windowClosed(WindowEvent e)
    {//Invoked when a window has been closed.
    timer.stop();
    dispose();
    System.exit(0);
    public void windowClosing(WindowEvent e)
    timer.stop();
    dispose();
    System.exit(0);}
    //Invoked when a window is in the process of being closed.
    public void windowDeactivated(WindowEvent e){}
    //Invoked when a window is de-activated.
    public void windowDeiconified(WindowEvent e){}
    //Invoked when a window is de-iconified.
    public void windowIconified(WindowEvent e){}
    //Invoked when a window is iconified.
    public void windowOpened(WindowEvent e){}
    //Invoked when a window has been opened.
    bye

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

  • Use of Java Swing +Applescript to move and resize Mac OS X windows using

    Here is an interesting use of Java on Mac OS X and Applescript to
    enable moving and resizing of windows using mouse and keyboard:
    [MoveResize tool|http://code.google.com/p/sandipchitalesmacosxstuff/#Move_and_resize_windows_on_Mac_OS_X]
    How it works:
    The implementation uses Applescript to get the front most window and
    it's bounds. It sends the bounds rectangle to a server implemented in
    Java over a socket connection. The Java server takes the screen shot
    of the full Desktop and uses it as the Image label (a JLabel with
    ImageIcon) as the content pane of an undecorated JFrame which has the
    same bounds as the Desktop. A JPanel with semitransparent background
    and a dark rounded rectangular border is given the same bounds that
    were received over the socket. This JPanel is added to the
    PALETTE_LAYER of the JFrame's layered pane - which makes it appear
    floating in front of the front window. A Mouse and a Key listener
    added to the JPanel allow moving and resizing of the JPanel. When the
    user types the ENTER key the JFrame is hidden and the new bounds of
    the JPanel are sent back to the Applescript over the socket connection
    which moves and resizes the front most window.
    Enjoy!
    Sandip
    Edited by: chitale on May 14, 2009 4:12 AM

    Copy the /Home/Documents/ folder to the NAS drive. That drive needs to support AFP or you may run into filename problems and/or other file related problems due to filesystem differences.
    Once the folder has been moved to the NAS select the folder on the NAS and CTRL- or RIGHT-click. Select Make Alias from the drop down menu. You should now have an alias named "Documents alias." On the Mac put the /Home/Documents/ folder in the Trash but don't delete it. Copy the alias file from the NAS to the /Home/ folder. Rename it to simply "Documents." Double-click on it to be sure it opens the folder on the NAS. If so you can empty the Trash. You're done.

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

  • Getting one window to progress to another using swing

    Ive got to design a simple quizgame interface using Swing. Its got to have a player's front-end - gives a selection of questions where the user selects one of five answers, a scoring front-end - displayed after game that allows user to enter their name and a manager's front-end - used to enter questions. The thing is I only have to design the interface. I want to have a front window that leads to the managers front end, scoreboard, and game seperatley. I also want the system to report back when the players got the question wrong or right and then take them to a scoreboard. I dont know how to keep this all seperate from the normal code in the program being written by someone else. I also dont know how to make one window lead to another etc. Please can someone help. does anyone have some code I coulkd adapt for this purpose Im really stuck!!!

    How are you using sounds in your movie? Exported to frame 1
    from the library (linkage)?
    see this:
    http://www.kennybellew.com/tutorial/
    --> **Adobe Certified Expert**
    --> www.mudbubble.com
    --> www.keyframer.com
    dcrawford wrote:
    > I've searched on this topic with several keywords to no
    avail.
    >
    > I have a sound playing (1.wav). I would like that sound
    to stop playing and
    > another (2.wav) to start when a button is pressed. How
    do I do this?
    >
    > So far I can either I can have both sounds playing, or
    neither (stopallsounds)
    > when it's clicked; but I would like to stop 1.wav and
    start 2.wav and can't
    > figure it out. Help!
    >

  • Using win xp32 firefox 22.0, clicking "new private window" opens a new NON-private window.

    seleecting "new private window" opens a new NON-private window.

    Hello,
    '''Try Firefox Safe Mode''' to see if the problem goes away. Safe Mode is a troubleshooting mode, which disables most add-ons.
    ''(If you're not using it, switch to the Default theme.)''
    * You can open Firefox 4.0+ in Safe Mode by holding the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * Or open the Help menu and click on the '''Restart with Add-ons Disabled...''' menu item while Firefox is running.
    ''Once you get the pop-up, just select "'Start in Safe Mode"''
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshooting extensions and themes]] article for that.
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    ''When you figure out what's causing your issues, please let us know. It might help other users who have the same problem.''
    Thank you.

  • Why do CS4 & CS5 use a non-standard Windows GUI skin?

    This has bugged me ever since I used CS4.
    I have used Photoshop on a netbook, and it's really difficult to because even while maximized, the window maintains a window border. This might not seem big but on a small netbook display every pixel counts. Furthermore, if Adobe gave us an option to turn off the skin and use a standard Windows GUI customization, I could make the window border small to fit on my netbook. Right now, it ignores the settings I use.
    I found a workaround in CS4 by using a program called WinPos that let me move the edges of the window off the edge of the screen so the border is not visible. This is a complicated solution, but it worked. But my company upgraded to CS5 and this workaround no longer works. No matter what I do the window "snaps" to the top edge of the screen.
    The Application bar also makes CS programs difficult to use while windowed, which is helpful in certain cases. If I reach for the file, edit, object menu and click slightly too low or too high, it grabs the window and drags it around. This is non-standard windows behavior. I should have the option for a normal-looking title bar and a normal looking menu bar that integrates into Windows using the standard GUI.
    I have looked at many hacks that people have tried on this forum and others, but there seems to be no way to completely turn off the application bar in all Adobe programs that use it. The Mac version allows you to turn off the Application Bar, why not allow Windows users the same convienence?
    This may seem trivial to some, but it is an annoyance to a lot of people I have spoken to. The new CS Live button has also brought this design of the Application Bar to the forefront. You can turn off the CS Live button by renaming a system file, but the CS live icon is still visible in InDesign. Many of the functions of the Application bar can be found in the menus themselves, which begs the question, why do we need this redundancy?
    Please, please give us a way to turn it off and make it work on all Adobe programs that use it. Or at the very least, tell me how to turn off the window snapping so I can use my WinPos workaround again.

    This is a user to user forum. If you want to tell Adobe, do it here: https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform
    Bob

  • What is the best way to use Swing GUIs in an MVC design?

    I have a question on how to build an application using swing frames for the UI, but using an MVC architecture. I've checked the rest of the forum, but not found an answer to my question that meets my needs.
    My application at this stage presents a login screen to get the userid and password, or to allow the user to choose a new locale. If an Enter action is performed, the userid and password are checked against the DB. If not accepted, the screen is repainted with a "try-again" message. If the Cancel action is performed, the process stops. If a locale action is performed, the screen is repainted with different langauge labels. Once the login process is passed, a front screen (another swing frame) is presented.
    Implementation: I am using a session object (Session, represents the user logging in) that calls the Login screen (LoginGUI, a Swing JFrame object with various components). Session uses setters in LoginGUI to set the labels, initial field entries etc, before enabling the screen. From this point, the user will do something with the LoginGUI screen - could be closing the window, entering a mix of userid and password, or maybe specifying a locale. Once the user has taken the action, if required, the session object can use getters to retrieve the userid and password values entered in the fields.
    The crux of the problem is 1) how will Session know that an action has been taken on the LoginGUI, and 2) how to tell what action has been taken.
    This could be solved by getting LoginGUI to call back to Session, however, I am trying to buid the application with a good separation of business, logic and presentation (i.e MVC, but not using any specific model). Therefore, I do not want LoginGUI to contain any program flow logic - that should all be contained in Session.
    I am aware of two possible ways to do this:
    1. Make LoginGUI synchronised, so that Session waits for LoginGUI to send a NotifyAll(). LoginGUI could hold a variable indicating what has happened which Session could interrogate.
    2. Implement Window Listener on Session so that it gets informed of the Window Close action. For the other two actions I could use a PropertyChangeListener in Session, that is notified when some variable in LoginGUI is changed. This variable could contain the action performed.
    Has anyone got any comments on the merits of these methods, or perhaps a better method? This technique seems fundamental to any application that interfaces with end-users, so I would like to find the best way.
    Thanks in advance.

    Hi,
    I tried to avoid putting in specific code as my question was more on design, and I wanted to save people having to trawl through specific code. And if I had any school assignments outstanding they would be about 20 years too late :-). I'm not sure computers more sophisticated than an abacus were around then...
    Rather than putting the actual code (which is long and refers to other objects not relevant to the discussion), I have put together two demo classes to illustrate my query. Comments in the code indicate where I have left out non-relevant code.
    Sessiondemo has the main class. When run, it creates an instance of LoginGUIdemo, containing a userid field, password field, a ComboBox (which would normally have a list of available locales), an Enter and a Cancel box.
    When the Locale combo box is clicked, the LoginGUIdemo.userAction button is changed (using an ActionListener) and a property change is fired to Session (which could then perform some work). The same technique is used to detect Enter events (pressing return in password and userid, or clicking on Enter), and to detect Cancel events (clicking on the cancel button). Instead of putting in business code I have just put in System.out.printlns to print the userAction value.
    With this structure, LoginGUIdemo has no business logic, but just alerts Sessiondemo (the class with the business logic).
    Do you know any more elegant way to achieve this function? In my original post, I mentioned that I have also achieved this using thread synchronisation (Sessiondemo waits on LoginGUI to issue a NotifyAll() before it can retrieve the LoginGUI values). I can put together demo code if you would like. Can you post any other demo code to demonstrate a better technique?
    Cheers,
    Alan
    Here's Sessiondemo.class
    import java.io.*;
    import java.awt.event.*;
    import java.util.*;
    import java.beans.*;
    public class Sessiondemo implements PropertyChangeListener {
        private LoginGUIdemo lgui;   // Login screen
        private int localeIndex; // index referring to an array of available Locales
        public Sessiondemo () {
            lgui = new LoginGUIdemo();
            lgui.addPropertyChangeListener(this);
            lgui.show();
        public static void main(String[] args) {
            Sessiondemo sess = new Sessiondemo();
        public void propertyChange(java.beans.PropertyChangeEvent pce) {
            // Get the userAction value from LoginGUI
            String userAction = pce.getNewValue().toString();
            if (userAction == "Cancelled") {
                System.out.println(userAction);
                // close the screen down
                lgui.dispose();
                System.exit(0);
            } else if (userAction == "LocaleChange") {
                System.out.println(userAction);
                // Get the new locale setting from the LoginGUI
                // ...modify LoginGUI labels with new labels from ResourceBundle
    lgui.show();
    } else if (userAction == "Submitted") {
    System.out.println(userAction);
    // ...Get the userid and password values from LoginGUIdemo
                // run some business logic to decide whether to show the login screen again
                // or accept the login and present the application frontscreen
    }And here's LoginGUIdemo.class
    * LoginGUIdemox.java
    * Created on 29 November 2002, 18:59
    * @author  administrator
    import java.beans.*;
    public class LoginGUIdemo extends javax.swing.JFrame {
        private String userAction;
        private PropertyChangeSupport pcs;
        /** Creates new form LoginGUIdemox */
        // Note that in the full code there are setters and getters to allow access to the
        // components in the screen. For clarity they are not included here
        public LoginGUIdemo() {
            pcs = new PropertyChangeSupport(this);
            userAction = "";
            initComponents();
        public void setUserAction(String s) {
            userAction = s;
            pcs.firePropertyChange("userAction",null,userAction);
        public void addPropertyChangeListener(PropertyChangeListener l) {
            pcs.addPropertyChangeListener(l);
        public void removePropertyChangeListener(PropertyChangeListener l) {
            pcs.removePropertyChangeListener(l);
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        private void initComponents() {
            jTextField1 = new javax.swing.JTextField();
            jTextField2 = new javax.swing.JTextField();
            jComboBox1 = new javax.swing.JComboBox();
            jButton1 = new javax.swing.JButton();
            jButton2 = new javax.swing.JButton();
            getContentPane().setLayout(new java.awt.FlowLayout());
            addWindowListener(new java.awt.event.WindowAdapter() {
                public void windowClosing(java.awt.event.WindowEvent evt) {
                    exitForm(evt);
            jTextField1.setText("userid");
            jTextField1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    EnterActionPerformed(evt);
            getContentPane().add(jTextField1);
            jTextField2.setText("password");
            jTextField2.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    EnterActionPerformed(evt);
            getContentPane().add(jTextField2);
            jComboBox1.setToolTipText("Select Locale");
            jComboBox1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    LocaleActionPerformed(evt);
            getContentPane().add(jComboBox1);
            jButton1.setText("Enter");
            jButton1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    EnterActionPerformed(evt);
            getContentPane().add(jButton1);
            jButton2.setText("Cancel");
            jButton2.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    CancelActionPerformed(evt);
            getContentPane().add(jButton2);
            pack();
        private void LocaleActionPerformed(java.awt.event.ActionEvent evt) {
            setUserAction("LocaleChange");
        private void CancelActionPerformed(java.awt.event.ActionEvent evt) {
            setUserAction("Cancelled");
        private void EnterActionPerformed(java.awt.event.ActionEvent evt) {
            setUserAction("Submitted");
        /** Exit the Application */
        private void exitForm(java.awt.event.WindowEvent evt) {
            System.exit(0);
         * @param args the command line arguments
        public static void main(String args[]) {
            new LoginGUIdemo().show();
        // Variables declaration - do not modify
        private javax.swing.JTextField jTextField2;
        private javax.swing.JTextField jTextField1;
        private javax.swing.JComboBox jComboBox1;
        private javax.swing.JButton jButton2;
        private javax.swing.JButton jButton1;
        // End of variables declaration

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

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

  • Migrate hundreds of Oracle databases to RHEL/Windows using DP/TTS/Shareplex

    Am working on devising a migration strategy for several Oracle databases from one physical data-center location to another data-center location through dedicated WAN links. Overall snapshot:
    Total 365 Dbs (28 to Oracle RAC 11gR2 and approx. 300 to DataGuard and Standalone). Source Databases versions are Oracle 9.2.0.4/9.2.0.7/10.2/10.2.0.4/11.2/11.2.0.4.
    Source Databases are currently on different versions of Linux/HPUX/AIX/Windows OS. Target Database OS platform(most of them): RHEL 5.8/RHEL 6(atleast for Unix) and Windows. Plan is to migrate same versions and not upgrade(due to applications dependency). am thinking of using
    -Oracle Datapump
    -Transportable Tablespaces+RMAN scripting(for target datafiles)
    -Shareplex for Databases in TB (this tool allows ZDT, zero-downtime migration/from Quest software)
    Also my Storage/SAN colleague is using Swing gear (AUTO-LUN+BC) to migrate virtualizing the storage arrays from Source to Target location. Is it possible to "piggyback" on this SAN-level migration of the "physical" datafiles and then use Shareplex to migrate the archivelogs and apply them over to Target databases?
    Need your inputs please. Thanks in advance..
    Abhijit

    Abhijit,
    If you haven't had any feedback yet then the best option is to ask this question in the Database forum -
    Forum: Database - General
    General Database Discussions
    This forum is for migratiing from non-Oracle to Oracle databases and they will be better able to help moving Oracle from one machine to another.
    Regards,
    Mike

Maybe you are looking for

  • USB6009 with Visual Studio 6.0

    Hello, I'm trying to use NI-USB 6009 supported by NIDAQmx using Visual C++ (Visual Studio 6.0). I've been used NIDAQ driver for traditional DAQ board, but this is the first time to use NIDAQmx driver. I wonder whether NIDAQmx supports Visual C++ (Vis

  • I have an HP Deskjet 2541 printer.

    When I go into printer settings I'm told.... settings are password protected. What's the password? I never set it up for a password. This is happening from "AiO Printer Remote"          Also, when I try to print from my broswer it prints 2 blank page

  • Why can't I open ppt file while I have already purchased office:mac 2011

    I am using macbook air running the latest os x Maverick, I have also installed office:mac 2011.  My friend sent me a ppt file but it cannot be opened.  Could someone please help?!  Many thanks!

  • How to Revert STMS_QA approval

    Hi experts, I have done STMS_QA in User Acceptance system to move the TR to Production.But now I realize that I have done a mistake and I want to revert the Approval given using STMS_QA. Kindly Help me out in this. thanks, Rakshith

  • E 63 Nokia Maps nightmare

    Hi All, Someone needs to help me out here. I am unable to load Nokia Maps onto my E 63.  I have E 63 and Nokia PC suite 7.1.30.9  Nokia Maps Updater1.0.10 Nokia Map loader-latest version. I get- "Connection to map server has been interrupted" with up