How to make a JWindow transparent

hi
as my question describes i wants to make a transparent window. please help me. example code should be appreciated .
thanx in advance.

That's an imitation of the transparent window.
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;
public class Test {
    JScrollPane scroll;
    JPanel p=new JPanel(new BorderLayout());
    Robot robot=new Robot();
    public Test()  throws Exception {
        final TransparentFrame frame=new TransparentFrame();
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.getContentPane().add(p);
        JButton b=new JButton("Test");
        b.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
/*                TransparentFrame frame1=new TransparentFrame();
                frame1.setBounds(100,100,100,100);
                frame1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                frame1.setVisible(true);*/
        frame.getContentPane().add(new JLabel("Test"));
        frame.getContentPane().add(b);
        frame.setBounds(100,100,200,200);
        frame.show();
    public static void main(String[] args) throws Exception {
        new Test();
class TransparentFrame extends JFrame {
    Robot robot;
    BufferedImage screenImg;
    Rectangle screenRect;
    MyPanel contentPanel=new MyPanel();
    boolean userActivate=false;
    public TransparentFrame() {
        super();
        createScreenImage();
        this.setContentPane(contentPanel);
        this.addComponentListener(new ComponentAdapter() {
            public void componentHidden(ComponentEvent e) {}
            public void componentMoved(ComponentEvent e) {
                resetUnderImg();
                repaint();
            public void componentResized(ComponentEvent e) {
                resetUnderImg();
                repaint();
            public void componentShown(ComponentEvent e) {}
        this.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e) {
            public void windowClosed(WindowEvent e) {
            public void windowOpened(WindowEvent e) {
            public void windowIconified(WindowEvent e) {
            public void windowDeiconified(WindowEvent e) {
            public void windowActivated(WindowEvent e) {
                if (userActivate) {
                    userActivate=false;
//                    boolean f=TransparentFrame.this.isShowing();
//                    if (f)
                        TransparentFrame.this.setVisible(false);
                    createScreenImage();
                    resetUnderImg();
//                    if (f)
                        TransparentFrame.this.setVisible(true);
                else {
                    userActivate=true;
            public void windowDeactivated(WindowEvent e) {
    protected void createScreenImage() {
        try {
            if (robot==null)
                robot=new Robot();
        catch (AWTException ex) {
            ex.printStackTrace();
        Dimension screenSize=Toolkit.getDefaultToolkit().getScreenSize();
        screenRect=new Rectangle(0,0,screenSize.width,screenSize.height);
        screenImg=robot.createScreenCapture(screenRect);
/*    public void show() {
        resetUnderImg();
        super.show();
    public void resetUnderImg() {
        if (robot!=null && screenImg!=null) {
            Rectangle frameRect=getBounds();
            int x=frameRect.x+4;
            contentPanel.paintX=0;
            contentPanel.paintY=0;
            if (x<0) {
                contentPanel.paintX=-x;
                x=0;
            int y=frameRect.y+23;
            if (y<0) {
                contentPanel.paintY=-y;
                y=0;
            int w=frameRect.width-10;
            if (x+w>screenImg.getWidth())
                w=screenImg.getWidth()-x;
            int h=frameRect.height-23-5;
            if (y+h>screenImg.getHeight())
                h=screenImg.getHeight()-y;
            contentPanel.underFrameImg=screenImg.getSubimage(x,y,w,h);
class MyPanel extends JPanel {
    BufferedImage underFrameImg;
    int paintX=0;
    int paintY=0;
    public MyPanel() {
        super();
        setOpaque(true);
    public void paint(Graphics g) {
        super.paint(g);
    protected void paintComponent(Graphics g) {
        super.paintComponent(g);
        g.drawImage(underFrameImg,paintX,paintY,null);
}

Similar Messages

  • How to make a completely transparent button in Flash Builder

    I am making a mobile application, and I am wondering how to make a completely transparent button. I've tried using
    <s:Button x="-5" y="0" width="410" height="1504"
                                    skinClass="spark.skins.mobile.TransparentNavigationButtonSkin" click="navigator.pushView(Sun)"/>
    But it still has one line on the side. I need a way to make it completely transparent.
    Thanks,
         8th grade student

    Try this alpha="0.001"
    Also add useHandCursor="true" and buttonMode="true" if you wish to have the hand cursor appear on hover.
    example  x="10" y="10" width="169" height="54" label="Button" alpha="0.001" useHandCursor="true" buttonMode="true" 
    HTH

  • How to make a JPanel transparent? Not able to do it with setOpaque(false)

    Hi all,
    I am writing a code to play a video and then draw some lines on the video. For that first I am playing the video on a visual component and I am trying to overlap a JPanel for drawing the lines. I am able to overlap the JPanel but I am not able to make it transparent. So I am able to draw lines but not able to see the video. So, I want to make the JPanel transparent so that I can see the video also... I am posting my code below
    import javax.media.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.util.*;
    import java.lang.Math;
    import javax.media.control.FramePositioningControl;
    import javax.media.protocol.*;
    import javax.swing.*;
    class MPEGPlayer2 extends JFrame implements ActionListener,ControllerListener,ItemListener
         Player player;
         Component vc, cc;
         boolean first = true, loop = false;
         String currentDirectory;
         int mediatime;
         BufferedWriter out;
         FileWriter fos;
         String filename = "";
         Object waitSync = new Object();
         boolean stateTransitionOK = true;
         JButton bn = new JButton("DrawLine");
         MPEGPlayer2 (String title)
              super (title);
              addWindowListener(new WindowAdapter ()
                   public void windowClosing (WindowEvent e)
                            dispose ();
                            public void windowClosed (WindowEvent e)
                         if (player != null)
                         player.close ();
                         System.exit (0);
              Menu m = new Menu ("File");
              MenuItem mi = new MenuItem ("Open...");
              mi.addActionListener (this);
              m.add (mi);
              m.addSeparator ();
              CheckboxMenuItem cbmi = new CheckboxMenuItem ("Loop", false);
              cbmi.addItemListener (this);
              m.add (cbmi);
              m.addSeparator ();
              mi = new MenuItem ("Exit");
              mi.addActionListener (this);
              m.add (mi);
              MenuBar mb = new MenuBar ();
              mb.add (m);
              setMenuBar (mb);
              setSize (500, 500);
              setVisible (true);
         public void actionPerformed (ActionEvent ae)
                        FileDialog fd = new FileDialog (this, "Open File",FileDialog.LOAD);
                        fd.setDirectory (currentDirectory);
                        fd.show ();
                        if (fd.getFile () == null)
                        return;
                        currentDirectory = fd.getDirectory ();
                        try
                             player = Manager.createPlayer (new MediaLocator("file:" +fd.getDirectory () +fd.getFile ()));
                             filename = fd.getFile();
                        catch (Exception exe)
                             System.out.println(exe);
                        if (player == null)
                             System.out.println ("Trouble creating a player.");
                             return;
                        setTitle (fd.getFile ());
                        player.addControllerListener (this);
                        player.prefetch ();
         }// end of action performed
         public void controllerUpdate (ControllerEvent e)
              if (e instanceof EndOfMediaEvent)
                   if (loop)
                        player.setMediaTime (new Time (0));
                        player.start ();
                   return;
              if (e instanceof PrefetchCompleteEvent)
                   player.start ();
                   return;
              if (e instanceof RealizeCompleteEvent)
                   vc = player.getVisualComponent ();
                   if (vc != null)
                        add (vc);
                   cc = player.getControlPanelComponent ();
                   if (cc != null)
                        add (cc, BorderLayout.SOUTH);
                   add(new MyPanel());
                   pack ();
         public void itemStateChanged(ItemEvent ee)
         public static void main (String [] args)
              MPEGPlayer2 mp = new MPEGPlayer2 ("Media Player 2.0");
              System.out.println("111111");
    class MyPanel extends JPanel
         int i=0,j;
         public int xc[]= new int[100];
         public int yc[]= new int[100];
         int a,b,c,d;
         public MyPanel()
              setOpaque(false);
              setBorder(BorderFactory.createLineBorder(Color.black));
              JButton bn = new JButton("DrawLine");
              this.add(bn);
              bn.addActionListener(actionListener);
              setBackground(Color.CYAN);
              addMouseListener(new MouseAdapter()
                             public void mouseClicked(MouseEvent e)
                   saveCoordinates(e.getX(),e.getY());
         ActionListener actionListener = new ActionListener()
              public void actionPerformed(ActionEvent aae)
                        repaint();
         public void saveCoordinates(int x, int y)
                    System.out.println("x-coordinate="+x);
                    System.out.println("y-coordinate="+y);
                    xc=x;
              yc[i]=y;
              System.out.println("i="+i);
              i=i+1;
         public Dimension getPreferredSize()
    return new Dimension(500,500);
         public void paintComponent(Graphics g)
    super.paintComponent(g);
              Graphics2D g2D = (Graphics2D)g;
              //g2D.setComposite(AlphaComposite.getInstance(AlphaComposite.CLEAR, 0.0f));
              g2D.setColor(Color.GREEN);
              for (j=0;j<i;j=j+2)
                   g2D.drawLine(xc[j],yc[j],xc[j+1],yc[j+1]);

    camickr wrote:
    "How to Use Layered Panes"
    http://java.sun.com/docs/books/tutorial/uiswing/components/layeredpane.html
    Add your video component to one layer and your non-opaque panel to another layer.Did you try that with JMF? It does not work for me. As I said, the movie seems to draw itself always on top!

  • Anyone know how to make an "Index Transparent" gif

    I have successfully made transparent PNGs and GIFusing an Alpha transparency but now I need to make images which would be the same as ueing fireworks / Photoshop to make a colour transparent. i.e. indexed transparency.
    Does anyone know how to do this.
    My code is as follows :
    // configure all of the parameters
    String text = "ABC abc XYZ xyz ["+ new Date()+"]";
    String font_file = "./tst/Maiandb.TTF";
    font_file = request.getRealPath(font_file);
    float size = 30.0f;
    Color background = Color.white;
    Color color = Color.black;
    Font font = Font.createFont(Font.TRUETYPE_FONT, new FileInputStream(font_file));
    font = font.deriveFont(size);
    buffer = new java.awt.image.BufferedImage(1,1,java.awt.image.BufferedImage.TYPE_INT_RGB);
    Graphics2D g2 = buffer.createGraphics();
    g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
    java.awt.font.FontRenderContext fc = g2.getFontRenderContext();
    java.awt.geom.Rectangle2D bounds = font.getStringBounds(text,fc);
    // calculate the size of the text
    width = (int) bounds.getWidth();
    height = (int) bounds.getHeight();
    // prepare some output
    buffer = new java.awt.image.BufferedImage(width, height, java.awt.image.BufferedImage.TYPE_INT_ARGB);
    g2 = buffer.createGraphics();
    g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
    g2.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
    g2.setFont(font);
    // actually do the drawing
    Color transparent = new Color(0, 0, 0, 0);
    g2.setColor(transparent);
    g2.fillRect(0,0,width,height);
    g2.setColor(color);
    g2.setComposite(AlphaComposite.SrcOver);
    g2.drawString(text,0,(int)-bounds.getY());
    File file = new File ("./jsp1/tst/fred1.gif");
    com.gif4j.light.GifImage gifImage = new com.gif4j.light.GifImage();
    com.gif4j.light.GifFrame gifFrame = new com.gif4j.light.GifFrame(buffer);
    gifImage.addGifFrame(gifFrame);
    GifEncoder.encode(gifImage, file);Thanks in advance

    ^^EDIT^^
    System admins updated iMac to OS X Mountain Lion (10.8.4).

  • How to make opaque white transparent?

    I have a JPEB, black words, hand lettered, on white.
    When I place it into an InDesign doc, on a solid color, the white background, being opaque, covers the solid color.
    How do I make that opaque white into a transparent background? Two manuals do not give me a clue.
    Thanks.

    larry red miller wrote:
    So if I go back to the original .psd file, a transparency option will
    materialize in one of the menus?
    No.. Photoshop transparency is automatically seen in Indesign for .psd files. All you need to make the background transparent in Photoshop.
    larry red miller wrote:
    Well, uhh, that is what I wanted to k now. Where do I find those methods?
    If you Google for "remove background in Photoshop" you will literally find THOUSANDS of tutorials.

  • How to make a Frame transparent?

    Hi everyone:
    I want to make a Frame transparent,it is possible?I find all the API but no result : (
    More, I want to increate my Frame's Height ,but it can't work. code is:
    Frame f=new Frame("Test");
    for(int i=0;i<6;i++){
    f.setSize(40,i * 10);
    }If I change to code to
    f.setSize(40,10);
    f.setSize(40,20);
    f.setSize(40,30);
    ...................It can work well.But why ? It is so complicated . : (
    Please help me

    More
    How to add a hyperlink Text in Frame? When I click it which can open a web site?

  • [iPhone] How to make one color transparent on a UIImage?

    On my iPhone app I have a UIImage instance. I want to get a derived a UIImage that is the result of the first UIImage where one of its colors (e.g. magenta) is made transparent. How can I do this?
    NOTE: I cannot make the color transparent in Photoshop, the UIImage is created on the fly by the user. I need to do the "postprocessing" on the phone itself, after the user is done "drawing" the image.

    jubgb
    I still do not know your version of Premiere Elements and  your computer operating system, but here is a plan that would probably work for Premiere Elements 11, 12/12.1, and 13/13.1 on Windows 7, 8, or 8.1 64 bit.
    But you say that you are starting with a black and white image. If you could start with the color version of the image, I think we have a promising path to have the fake blood appear in color on a black and white image.
    This would be done by applying the Color Pass effect to the color photo version. Color Pass Effect is  found under fx Effects/Image Control/Color Pass.
    Then you would edit the Color Pass effect under Applied Effects Tab/Appied Effects Palette/Color Pass Panel expanded. But I find that the most effective editing of that effect is done using the Setup whose icon appear to the right of the Color Pass Panel.
    Have you used the Color Pass effect before?
    https://helpx.adobe.com/premiere-elements/using/effects-reference.html
    I will offer how to suggestion for its use if interested. As for starting with the black and white, then I need to think about that some more.
    ATR

  • How to make JPanel to transparent?

    Dear all, anyone here know how to make 2 JPanel to transparent and overlabbing? i try to use opaque(boolean), but i fail to do it, here is my code, i really need ur help.......thankx a lot
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Main extends JApplet
         public void init()
              DrawBase db=new DrawBase();
              DrawGraph dg=new DrawGraph();
              Container container=getContentPane();
              db.setOpaque(true);
              dg.setOpaque(true);
              container.add(db,BorderLayout.CENTER);
              container.add(dg,BorderLayout.CENTER);
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class DrawBase extends JPanel
         public DrawBase()
         public void paintComponent(Graphics g)
              super.paintComponent(g);
              g.setColor(new Color(0,255,0));
              g.drawOval(50,50,50,50);
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class DrawGraph extends JPanel
         public DrawGraph()
         public void paintComponent(Graphics g)
              super.paintComponent(g);
              g.setColor(new Color(255,0,0));
              g.drawOval(20,10,10,10);

    Hi,
    Dear all, anyone here know how to make 2 JPanel to
    transparent and overlabbing? i try to use
    opaque(boolean), but i fail to do it, here is my code,
    i really need ur help.......thankx a lot
    Well, the transparent part is easy. You should be calling setOpaque(false) rather than setOpaque(true). This will eliminate background painting of the JPanels.
    The overlapping can be accomplished in multiple ways, but NOT using BorderLayout. You'll either want to do as one person suggested and use no layout manager and position things absolutely, or as another suggested and use JLayeredPane.
    Personally, I would suggest a third approach that uses a single JPanel to do all of the painting. Something like this would work nicely:
    public class DrawPanel extends JPanel {
        public DrawPanel() {
            setOpaque(false);
        public void paintComponent(Graphics g) {
            super.paintComponent(g);
            drawBase();
            drawGraph();
        public void drawBase() {
            g.setColor(new Color(0,255,0));
            g.drawOval(50,50,50,50);
        public void drawGraph() {
            g.setColor(new Color(255,0,0));
            g.drawOval(20,10,10,10);
    }Regards,
    Shannon Hickey (Swing Team)

  • How to make component semi-transparent?

    Hi,
    I want to make a component semi transparent so that i can see through component below that? is it possible in swing? if it is how can i do that?
    Thanks,
    Sato.

    I've had limited success by specifying a background color using an alpha value.
    setBackground( new Color(123, 123, 123, 128) );

  • How to make a semi-transparent layer?

    Hello everyone,
    I am making my own website with Dreamwaver. I am a totally
    new user and have no IT background. So could anyone here kindly
    help me with my question:
    In the main page I would like to use two layers with images
    inserted. The second one will be a semi-transparent image which is
    made in Fireworks. I would like to let this layer cover the first
    one. Because it's semi-transparent, so i should still be able to
    see the underlying image... I did all this, but finally in the IE
    the second layer is NOT transparent at all.
    I don't know where the problem is. Please, if anyone knows
    the solutions or have any suggestion, let me know!
    Thanks!
    Inca

    I'll show it to you my way:
    1. Type the text and click the layer mask icon. The layer mask should be all white and have a small border. That indicates the mask ist active.
    The foreground color should be black and the background color white.
    2. Choose the gradient tool. Open the gradient window. Choose the first gradient, "foreground to background" = black to white.
    Change the white color to gray.
    3. Check the layer mask > is it active?
    Apply the gradient from right to left over your text.
    See the thin line in the screenshot.
    4. On your layer mask appears the gradient, left starting with gray and right ending with black.
    The advantage of this method is that you can change your text without  modifying the gradient.
    The black color on the layer mask hides the text, the gray color makes the text more or less visible and white color means full visible.
    Hope it helps.
    miss marple

  • How to make form field transparent?

    I would like to change the blue color of the fields to transparent. How can I do it?

    Do you mean the highlight color? You can disable it via the Preferences window (under Forms).

  • How to make Layers NOT transparent ??

    Hey i am making an animation
    Its of a guy walking but he is transparent. I have already got like 100+ frames of him walking but he is transparent and therefore i cannot put a background or it shows through.
    Is there anyway i can make all existing frames nontransparent.

    The easiest way is to create a new layer and fill it with what ever color you choose then when your ready for a new layer just duplicate that layer with ctrl-j or cmd-j (former is windows and later is mac)

  • How to make the stage transparent for SWF file being used in Dreamweaver

    I have a SWF file in my Dreamweaver site, that plays correctly. The problem is that the stage is white and we would like it to be transparent. Searching the archives the following advice was given:
    in your html embedding code you need to set the wmode parameter to be "transparent"
    I'm wondering if this is the code in Dreamweaver or is this done in Flash. I'm working with CS5. Below is the code that matches the SWF file in Dreamweaver. I did change the wmode value from "opaque" to "transparent" and it didn't work.
    Thanks for any assistance.
    Sherri
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="650" height="400" id="FlashID" title="Convergence Gathering Title">
                 <param name="movie" value="Flash/gold_dust_title.swf" />
                 <param name="quality" value="high" />
                 <param name="wmode" value="opaque" />
                 <param name="swfversion" value="6.0.65.0" />
                 <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
                 <param name="expressinstall" value="Scripts/expressInstall.swf" />
                 <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
                 <!--[if !IE]>-->
                 <object type="application/x-shockwave-flash" data="Flash/gold_dust_title.swf" width="650" height="400">
                   <!--<![endif]-->
                   <param name="quality" value="high" />
                   <param name="wmode" value="opaque" />
                   <param name="swfversion" value="6.0.65.0" />
                   <param name="expressinstall" value="Scripts/expressInstall.swf" />
                   <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
                   <div>
                     <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
                     <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
                   </div>
                   <!--[if !IE]>-->
                 </object>
                 <!--<![endif]-->
               </object>

    Yes, change this to "transparent" in ALL the places where wmode is shown
    <param name="wmode" value="opaque" />
    Second, be sure that there is in fact nothing covering the entire stage, like a big white rectangle.
    Also, what is directly behind the .swf once it's on the Web page? If the background color of that page or the <div> that the .swf is in is white..... well then then .swf can have a transparent background but then the white from the Web page just shows thru.... so there's still a white background.
    Be sure there is a non-white background on the Web page...
    Window Mode (wmode) - What's It For?
    There are three window modes.
    Window
    Opaque
    Transparent
    By default, the Flash Player gets its own hWnd in Windows. This means that the Flash movie actually exists in a display instance within Windows that lives above the core browser display window. So though it appears to be in the browser window, technically, it isn't. It is most efficient for Flash to draw this way and this is the fastest, most efficient rendering mode. However, it is drawing independently of the browser's HTML rendering surface. This is why this default mode (which is equivalent to wmode="window") doesn't allow proper compositing with DHTML layers. This is why your JavaScripted drop-down menus will drop behind your Flash movie.
    In windowless modes (like opaque), Flash Player doesn't have a hWnd. This means that the browser tells the Flash Player when and where to draw onto the browser's own rendering surface. The Flash movie is no longer being rendered on a higher level if you will. It's right there in the page with the rest of the page elements. The Flash buffer is simply drawn into whatever rectangle the browser says, with any Flash stage space not occupied by objects receiving the movie's background color.
    Best wishes,
    Adninjastrator

  • How to make an image transparent?

    Hi everybody,
    I need to build a complex chart in my applet, for this I want at first to create some painted area and then to put a map over it. The map is an image, which consists basically of black lines for state borders, main rivers and lakes on the white background. What I need is to put just these black lines, not the white background which will kill previously painted area.
    Can anyone give me an idea?
    Thanks,
    Alexandre

    Here's a class that implements this. I need a "transparent" object that has a big red arrow that I can point at stuff, so it gets its parents context and paints that then paints the red arrow stuff. The only problem with this is that it is not a glass pane. The "transparent" object must be contained in one object so you can only "paint over" one object.
    public class KiaTutorialArrow extends Panel
         public static final int WEST = 0, EAST = 1, NORTH = 2, SOUTH = 3;
         private int direction = 0;
         private Polygon arrow;
         //public Color foreground;;
         ////////constructors/////////////////////////////////////
         public KiaTutorialArrow()
              super();
              setSize(40,25);
         ////////////////get and set functions////////////////////
         public int getDirection()
              return direction;
         public void setDirection(int index)
              this.direction = index;
              arrow = null;
              repaint();
         public String getName()
              return super.getName();
         public void setName(String name)
              super.setName(name);
              repaint();
         public Color getBackground()
              return super.getBackground();
         public void setBackground(Color c)
              super.setBackground(c);
              repaint();
         public void paint(Graphics g)
              // TRANSPARENCY IS THE DEFAULT     
              Container c = getParent();
              Graphics graphics = g.create(- getLocation().x, - getLocation().y, c.size().width, c.size().height);
              c.paint(graphics);
              g.setColor(Color.red);
              switch (direction)
                   case WEST: drawWest(g); break;
                   case EAST: drawEast(g); break;
                   case NORTH: drawNorth(g); break;
                   case SOUTH: drawSouth(g); break;
                   default: return;
         private void drawWest(Graphics g)
              if (arrow == null)
                   arrow = new Polygon();
                   arrow.addPoint(2,12);
                   arrow.addPoint(12,5);
                   arrow.addPoint(12,8);
                   arrow.addPoint(27,8);
                   arrow.addPoint(27,17);
                   arrow.addPoint(12,17);
                   arrow.addPoint(12,20);
              g.drawPolygon(arrow);
              g.fillPolygon(arrow);
         private void drawEast(Graphics g)
              if (arrow == null)
                   arrow = new Polygon();
                   arrow.addPoint(7,8);
                   arrow.addPoint(22,8);
                   arrow.addPoint(22,5);
                   arrow.addPoint(32,12);
                   arrow.addPoint(22,20);
                   arrow.addPoint(22,17);
                   arrow.addPoint(7,17);
              g.drawPolygon(arrow);
              g.fillPolygon(arrow);
         private void drawNorth(Graphics g)
              if (arrow == null)
                   arrow = new Polygon();
                   arrow.addPoint(8,0);
                   arrow.addPoint(15,10);
                   arrow.addPoint(12,10);
                   arrow.addPoint(12,25);
                   arrow.addPoint(3,25);
                   arrow.addPoint(3,10);
                   arrow.addPoint(0,10);
              g.drawPolygon(arrow);
              g.fillPolygon(arrow);
         private void drawSouth(Graphics g)
              if (arrow == null)
                   arrow = new Polygon();
                   arrow.addPoint(8,25);
                   arrow.addPoint(0,15);
                   arrow.addPoint(3,15);
                   arrow.addPoint(3,0);
                   arrow.addPoint(12,0);
                   arrow.addPoint(12,15);
                   arrow.addPoint(15,15);
              g.drawPolygon(arrow);
              g.fillPolygon(arrow);
    }

  • How to make frames/panels transparent?

    Say I wanted to have a window that had rounded edges, or a weird shape. Is there a way to create transparency on a frame so I can pull off this effect?

    http://forum.java.sun.com/thread.jspa?threadID=789490

Maybe you are looking for

  • BW error with Excel 2007

    Hi Expert, I found some critical issues that in Excel 2007 1, can not read 20000 records at one time, it will pop upan issue window with the error message "Client out of memory" , but it works well in Excel 2003. 2, When I tried to open the other rep

  • File Adapter and reading all XML files from direcotry

    Problem occurs on PI 7.1 I defined sender file adapter. File name mask is: "*.xml" to read all XML messages from directory. Quality of service is: Exactly One. Poll Interval: 30 Retry interval: 30 Processing mode: Archive with option "Add Timestamp".

  • Messaging not synking with Gmail since thr 20th Oc...

    I have a little problem with Nokia Messaging, for some reason messaging does not download any email from gmail since the 20th october, and even if i reinstall the app, it still only downloads the mail from the 20th. I haven't changed anything on the

  • Oracle b2b 11g jdev b2b issue

    Hi I am using 11g soa suite with jdev for b2b and while dragging the b2b adaptor and clicking next and then select the default then click next and all my connection to the localhost passes when i click "test b2b" button in the "soa http port" textbox

  • One solution for AppleTV not appearing in iTunes Devices list

    So, this may not be everyone's problem, but I noticed I was having trouble seeing my AppleTV in iTunes sources list when my iBook (the syncing computer) was on wireless, but not when i was plugged into the router via ethernet. Perplexed by this, I ke