No images drawn in JApplet!!!

Hi all
Ive a small problem with my applet.
THE SITUATION:
Here is what I do, I've two packages, A and B, which means I've to directories. In A I've also a directorie img, in which my images are stored.
My html file:<applet code=advanced.Toepen.class width="700" height="600" CODEBASE=".">
</applet>This works fine
THE PROBLEM (the jar file)
When I use:<applet code=advanced.Toepen.class width="700" height="600" CODEBASE="." ARCHIVE="arch,jar">
</applet>Now, eveything is still the same, except for the images, they are not shown anymore!!!!!!!!!!
Any suggestions of what I'm doing wrong here??????
Luca

<applet code=advanced.Toepen.class width="700" height="600" CODEBASE="." ARCHIVE="arch,jar">
Is that a comma I see in the ARCHIVE attribute?
Try this
Image img = applet.getImage(applet.getDocumentBase(),"A/img/someImage.gif");
or this
Image img = applet.getImage(applet.getDocumentBase(),"/A/img/someImage.gif");
or this
Image img = applet.getImage(applet.getDocumentBase(),"img/someImage.gif");
Depending on what your package structure is

Similar Messages

  • Background image for a JApplet

    Hi everybody.
    I have a app with some textfields, buttons and some JLabels.
    I want to put a image as background.
    How can I do that?
    Thanks in advance.

    JApplet (and JFrame and any root container) has a Container that it uses to hold everything else, its contentPane. I would create a JPanel and make it my applet's contentPane and then add everything to this contentPane. To show an image on the contentPane/JPanel, I'd simply Google Background image jpanel. I'd get and then read this: [http://faq.javaranch.com/java/BackgroundImageOnJPanel]
    (I've actually bookmarked this page as it gets asked here so often).

  • Flickering Image update (only one Image drawn on Component), 10+ Duke Dolla

    I've made an RBGFilter for Images and Combined it with a Thread
    to make an Image fade from Color to Grayscale.
    I use it together with an home made JComponent. It works, but the Image flickers.
    I've tried longer sleep periods (I thougt that maybe the filter was to slow) but it still flickered when changing the Image. I tried dubbel buffering, but couldn't get it to change the Image. Anyway, I suppose double buffering wouldn't help much, while it's only one Image to be drawn and it covers the entire Component.
    Does anyone have a clue about how to do?? You'll get plenty of Duke Dollars!
    (in the fade class)
    public void run()
    try{
    while( !Thread.interrupted() ){
    Thread.sleep( 70 );
    //Change colors:
    Image tmpImage = Toolkit.getDefaultToolkit().createImage(
    new FilteredImageSource( colorImage.getSource(), fadeFilter ) );
    ImageComponent.setImage( tmpImage ); //Home made component
    //test if fading is finished...
    catch( InterruptedException ie ){}
    (in the home made component)
    public void setImage( Image theImage )
    this.theImage = theImage;
    repaint();
    public void paintComponent( Graphics g )
    g.drawImage( theImage, 0, 0, this );
    }

    I dont know much about java but i do know a bit about MFC and this reminds me of a similiar issue in mfc. So heres my bet:
    Calls to repaint do call directly to paintComponent they first execute some code that paints the background of the component then calls the paintComponent routine. Typically the background is white and this results in flickering.
    Thats just a hunch. Because its similiar to an issue that you get in MFC around animation with framework paint calls.
    You can play the hunch by calling paintComponent directly and see if your flickering goes away. If it does find a way to use repaint without it repainting the background before it calls paintComponent (im sure theres a way or a similiar framework routine)
    One last thing? is the custom componet that your working with swing based? Cause swing based components are supposed to double buffer by default.

  • Caching images in a JApplet

    I have a JApplet here:
    http://www.jujubees.org/java_photo_album/photoAlbum.html
    the code is coming along well but I have one major problem. The images seem to take for ever to download even with a high speed cable connection (so god only knows how long a dial up would take). What technique can I use to make sure the images are being cached in the web browser? Also is there a way to check and see if the browser has cached a certain image? If you want to see the code then I could post it.

    I have a JApplet here:
    http://www.jujubees.org/java_photo_album/photoAlbum.htm
    the code is coming along well but I have one major
    problem. The images seem to take for ever to download
    even with a high speed cable connection (so god only
    knows how long a dial up would take). What technique
    can I use to make sure the images are being cached in
    the web browser? Also is there a way to check and see
    if the browser has cached a certain image? If you want
    to see the code then I could post it.Well you could check to see if the images are being cached by printing out the details of your images, byte size and so on. If you want the browser to cache all the images what you could do is feed the location of the images into the applet, with a parameter for instance, then create a thread that iterates over the images in the directory and loads them into a hashtable of some kind. So the rendering would be faster. Or put them into a .jar/.zip, would be faster. You don't have to wait for all the images to load to display the first one.
    Unless you are manually coding the images in your code you can be fairly certain that the browser is not going to. Perhaps with advanced browsers like Opera, but even then, no.
    See ya
    Michael

  • How to edit an image drawn on paper

    Hi, I am fairy new to Photoshop and I have a few questions. I have drawn an image on paper and want to edit/color it. I scanned the image into my computer and saved it as a .pdf and opened it in Photoshop. The image opened, but it is pretty challenging to edit. Is there an easy/easier way to do this? The image is an alligator drawn in pencil. I simply want to open it and add color, but how can I outline all of the lines I have drawn so I can color different areas separately? I hope this makes sense, I have been browsing through a cs4 book, but havent had much luck, I am pretty novice at this.
    Thank you!

    Normally, when I draw something and scan it in, I save it as a tif file or a jpg ( I've never scanned an image as a pdf, unless it's a document that I'm sending.) If it's something you're going to be working on in photoshop, I recommend a tif file or a high res jpg.
    Take a look at this link...perhaps it will help you with filling in your drawing.
    http://www.melissaevans.com/tutorials/colouring-line-art/2

  • Putting an image into a JApplet

    Okay so I've made a logo in Fireworks, saved as a jpg, and now I'm trying to put it on to my JApplet.
    I've tried...
    ImageIcon logo = new ImageIcon("C:\folder1\folder2\image.jpg");
    mainNorth.add(logo);
    but it says illegal escape character compiler error...any ideas? :s

    Aurora88 wrote:
    it still says illegal escape character...:sLet's see:
    1) the complete error message (yes, the whole thing, and please put it between code tags)
    2) an SSCCE -- a small program that compiles and demonstrates your problem. This program will just create a JApplet and try to place an image in a JPanel of the JApplet, it should be enough code to demonstrate your problem and nothing else. For more information, have a look at this:
    http://homepage1.nifty.com/algafield/sscce.html
    Remember, the code must be compilable and runnable for many of us to be able to understand it fully.
    Also, when posting your code, please use code tags so that your code will retain its formatting and be readable. To do this, either use the "code" button at the top of the forum Message editor or place the tag &#91;code] at the top of your block of code and the tag &#91;/code] at the bottom, like so:
    &#91;code]
      // your code block goes here.
    &#91;/code]

  • How to make smooth hardware accelerated JApplet?

    Hi there ive made a game that extends JPanel and im using the paintComponent method to do my painting
    as far as i know JPanel is hardware accelerated by default bufferStrategy(2)
    ive put the JPanel in a JFrame and the game runs very smooth with ~62fps and cpu usage is <10%
    then i tried putting the JPanel in JApplet and opened it in firefoxbrowser and the fps says ~59fps and cpu usage ~30% but its super skippy and looks like its drawing incorrectly like some of the objects are displaced very far from where they are supposed to be some frames and drawn perfectly some other frames. What's happening? Is there anyway to fix this?
    Below is some code that for a JApplet and JFrame they both contain the JPanel and ive packed everything in a jar file that can be run as a desktopapp or japplet
    I've also tried add the JApplet directly into the JFrame but it seems the performance might go down a little (though im not sure how much)
    main extends JApplet
    RobotValkyrieAttack extends JPanel
    package RobotValkyrieAttack;
    import javax.swing.*;
    import java.awt.*;
    import java.util.*;
    import java.awt.event.*;
    public class main extends JApplet{
         static LinkedList<Image> listImage;
         //no JApplet constructor is allowed to be overrriden
         public void init(){ //called by the japplet container
              this.loadImages();
              RobotValkyrieAttack r = new RobotValkyrieAttack(listImage);
              this.add(r);
              Thread t = new Thread(r);
              t.start();
              this.addKeyListener(r);
         public void loadImages(){
              //images
              listImage = new LinkedList<Image>();
              listImage.add( new ImageIcon(this.getClass().getResource("data/valkyrie0.png")).getImage() );
              listImage.add( new ImageIcon(this.getClass().getResource("data/astroid0.png")).getImage() );
              listImage.add( new ImageIcon(this.getClass().getResource("data/clouds0.jpg")).getImage() );
              listImage.add( new ImageIcon(this.getClass().getResource("data/cloud0.png")).getImage() );
              listImage.add( new ImageIcon(this.getClass().getResource("data/cloud1.png")).getImage() );
              listImage.add( new ImageIcon(this.getClass().getResource("data/cloud2.png")).getImage() );
              MediaTracker mt = new MediaTracker(this);
              for(int i=0; i<listImage.size(); i++){
                   mt.addImage(listImage.get(i),0);
              try{
                   mt.waitForAll();
              catch(Exception ex){
                   ex.printStackTrace();
         public void update(Graphics g){
              this.paint(g);
         public static void main(String args[]){
              JFrame j = new JFrame();
              j.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              j.setSize(1200,700);
              j.setLocationRelativeTo(null);
              main m = new main();
              m.loadImages();
              RobotValkyrieAttack r = new RobotValkyrieAttack(listImage);
              j.add(r);
              Thread t = new Thread(r);
              t.start();
              j.addKeyListener(r);
              main m = new main();
              m.init();
              j.add(m);
              j.setVisible(true);
    }

    Before we begin, note that performance of Java graphics has always been a bit 'hit and miss' in the sense that the same box with the same hardware and Java version can show radically different FPS rates if the video driver is updated.
    For better help sooner, post an SSCCE.
    Applet SSCCEs that involve images are a problem. Normally I would invite creators of image based SSCCEs to hot-link to [images available off my site|http://pscode.org/media/#image], but an applet cannot hot-link to images. It will be necessary to generate the images in code, if you want much chance of people running the code. Note that very few people will follow a link to anywhere, or download any 'build zip' or similar, to help out on a problem.
    That code snippet as posted, had a number of things that seemed horrific.
    - A class called 'main'. O_o Better would be AppletRenderTest which is not only more descriptive, but also uses the common nomenclature for a class name.
    - Frame size 1200x700?! It pays to ensure any 'comparison' of applet and application is done at the same size and my screen size is 1024x768. Make it a lot smaller, like 800x600.
    - A Swing based Timer is more typically used for Swing animation, than a Thread/Runnable.
    - GUI construction should be done on the EDT.
    - This..
    //no JApplet constructor is allowed to be overrriden..is not only factually wrong, but also incorrectly spelt.
    I am not confident you are up to writing:
    - Test code (especially test code you intend others to help with)
    - GUIs
    - Animation code
    - Applets
    Or if you are capable of parts of that, of combining the 4.
    Are you confident?

  • How to capture an Image

    Hypothetically...
    I have an image drawn on a JPanel, say, a line running through a circle. How do I go about capturing this particular image, w/out getting other images that mau be present?
    Also, is there a way for me to allow the user to selct an image by either
    * - selecting it using a rectangle
    * - drawing around the image (via the mouse)
    and then pasting it wherever they please?
    Thanks again...

    weird...
    For image capture from components, you can do a couple things...
    java.awt.Robot.createScreenCapture() can capture whatever's on the screen within the given area.
    Or you can create an image object and paint on it, either by drawing on the graphics object of the image directly, or passing the graphics object to a component to have it draw itself on the component.
    BufferedImage bi = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
    Graphics2D g2d = bi.createGraphics();
    comp.paint(g2d);
    // or draw on the graphics yourself
    hi i actullay new to the forum so can you please tell me first to
    whom i sen't this message to.you sent it to everyone...
    For video capture stuff, look up Java Media Framework.

  • Loading a raw image in BufferedImage

    Hi guys,
    I'm very new to java .I have a raw image which has 32 bit pixels which has ABGR...with alpha as the most signficant byte and the red as the least significant byte. I have an array of ints and I want to load this to a BufferedImage object. I then use a JPanel and render the BufferedImage on to it. I tried doing with other file formats like jpg , gifs and so the rendering to the JPanel works fine. But I'm not able to get the array of ints to be stored in BufferedImage correctly. Could you please let me know what I did was wrong or any suggestions?
    Currently I have a class called RGBAImage that reads the raw image and stores it as an array of ints.
    So in order to create a BufferedImage I do this roughly,
    DataBufferInt buffer = new DataBufferInt(img.getPixels() , img.getPixels().length) ;
    //                                                        bits  red                   green                   blue                 alpha
    ColorModel cm = new DirectColorModel(32, (int)0x000000ff , (int)0x0000ff00 , (int)0x00ff0000 , (int)0xff000000) ;
    SampleModel sm = cm.createCompatibleSampleModel(img.getWidth , img.getHeight) ;
    WriteableRaster raster = Raster.createWritableRaster(sm , buffer , null) ;
    BufferedImage bimg = new BufferedImage(cm , raster , false , null) ;Is this how its to be done? I am not getting the image drawn on the panel. Any suggestions or links?
    Thank you
    Siddharth

    I have an array of ints and I want to load this to a BufferedImage object.In your sample code I cannot see how the int array you are talking about becomes the image data. Also, what is the img variable? Please provide a more complete code sample.

  • Problem placing buttons on top of a background image

    My knowledge of Java isn't the greatest and I am currently having problems placing buttons on top of a background image within a JApplet (this is also my first encounter with Applets).
    I'm using a Card Layout in order to display a series of different screens upon request.
    The first card is used as a Splash Screen which is displayed for 5 seconds before changing to the Main Menu card.
    When the Main Menu card is called the background image is not shown but the button is.
    While the Applet is running no errors are shown in the console.
    Full source code can be seen below;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.net.*;
    // First extend JApplet
    public class WOT extends JApplet {
         //--------------- Variables are declared here -----------------
         private CardLayout contentCardLayout = new CardLayout();  // declare CardLayout
         private Container contentContain;     // declare content Container
         private JPanel contentCard, splashScreen, mainMenu, menuImage; // declare content Panels
         private JLabel splash, menu, map; // declare image labels
         private ImageIcon mapBtn; // declare ImageIcons
         private JButton mapOption; // declare option Buttons
         private Timer timer; // declare Timer
         private ActionListener actionListener, mapOptionListener; // declare ActionListener
    //--------------- Initialise Applet -----------------
      public void init() {
         //--------------- Set-up Card Layout -----------------
         contentCard = new JPanel(contentCardLayout); // assign card panels to CardLayout
         //--------------- Splash Screen -----------------
         splashScreen = new JPanel();
         splash = new JLabel(new ImageIcon(getClass().getResource("img/bg.gif")));
         splashScreen.add(splash);
         splashScreen.setSize(600,800);
         splashScreen.setLocation(0,0);
    //--------------- "View Map" Option Button -----------------
         mapBtn = new ImageIcon(getClass().getResource("img/map.gif"));
         mapOption = new JButton(mapBtn);
         mapOption.setBorder(null);
         mapOption.setContentAreaFilled(false);
         mapOption.setSize(150,66);
         mapOption.setLocation(150,450);
         mapOption.setOpaque(false);
         mapOption.setVisible(true);
    //--------------- Main Menu Screen -----------------
         //menuImage = new JPanel(null);
         //menuImage.add(mainMenu);
         //menuImage.setLocation(0,0);
         mainMenu = new JPanel(null);
         menu = new JLabel(new ImageIcon(getClass().getResource("img/menu.gif")));
         menu.setLocation(0,0);
         mainMenu.add(menu);
         //mainMenu.setBackground(Color.WHITE);
         mainMenu.setLocation(0,0);
         mainMenu.setOpaque(false);
         //mainMenu.setSize(150,66);
         mainMenu.add(mapOption);
         //--------------- Map Image Screen -----------------
         map = new JLabel(new ImageIcon(getClass().getResource("img/map.gif")));
         //--------------- Add Cards to CardLayout Panel -----------------
        contentCard.add(splashScreen, "Splash Screen");
         contentCard.add(mainMenu, "Main Menu");
         contentCard.add(map, "Map Image");
    //--------------- Set-up container -----------------
          contentContain = getContentPane(); // set container as content pane
          contentContain.setBackground(Color.WHITE); // set container background colour
           contentContain.setLocation(0,0);
           contentContain.setSize(600,800);
          contentContain.setLayout(new FlowLayout()); // set container layout
           contentContain.add(contentCard);  // cards added
           //--------------- Timer Action Listener -----------------
           actionListener = new ActionListener()
                    public void actionPerformed(ActionEvent actionEvent)
                             //--------------- Show Main Menu Card -----------------
                             contentCardLayout.show(contentCard, "Main Menu");
         //--------------- Map Option Button Action Listener -----------------
           mapOptionListener = new ActionListener()
                    public void actionPerformed(ActionEvent actionEvent)
                             //--------------- Show Main Menu Card -----------------
                             contentCardLayout.show(contentCard, "Map Image");
         //--------------- Timer -----------------               
         timer = new Timer(5000, actionListener);
         timer.start();
         timer.setRepeats(false);
    }Any help would be much appreciated!
    Edited by: bex1984 on May 18, 2008 6:31 AM

    1) When posting here, please use fewer comments. The comments that you have don't help folks who know Java read and understand your program and in fact hinder this ability, which makes it less likely that someone will in fact read your code and help you -- something you definitely don't want to have happen! Instead, strive to make your variable and method names as logical and self-commenting as possible, and use comments judiciously and a bit more sparingly.
    2) Try to use more methods and even classes to "divide and conquer".
    3) To create a panel with a background image that can hold buttons and such, you should create an object that overrides JPanel and has a paintComponent override method within it that draws your image using the graphics object's drawImage(...) method
    For instance:
    an image jpanel:
    import java.awt.Dimension;
    import java.awt.Graphics;
    import java.awt.image.BufferedImage;
    import java.io.File;
    import java.io.IOException;
    import java.net.URISyntaxException;
    import java.net.URL;
    import javax.imageio.ImageIO;
    import javax.swing.JButton;
    import javax.swing.JPanel;
    public class BackgroundImage
        // **** this will have to be changed for your program:
        private static final String IMAGE_PATH = "../../m02/a/images/Forest.jpg";
        private BufferedImage myImage = null;
        private JPanel imagePanel = new JPanel()
            @Override
            protected void paintComponent(Graphics g)
            {   // *** here is where I draw my image
                super.paintComponent(g);  // **** don't forget this!
                if (myImage != null)
                    g.drawImage(myImage, 0, 0, this);
        public BackgroundImage()
            imagePanel.setPreferredSize(new Dimension(600, 450));
            imagePanel.add(new JButton("Foobars Rule!"));
            try
                myImage = createImage(IMAGE_PATH);
            catch (IOException e)
                e.printStackTrace();
            catch (URISyntaxException e)
                e.printStackTrace();
        private BufferedImage createImage(String path) throws IOException,
                URISyntaxException
            URL imageURL = getClass().getResource(path);
            if (imageURL != null)
                return ImageIO.read(new File(imageURL.toURI()));
            else
                return null;
        public JPanel getImagePanel()
            return imagePanel;
    }and an applet that uses it:
    import java.lang.reflect.InvocationTargetException;
    import javax.swing.JApplet;
    import javax.swing.SwingUtilities;
    public class BackgrndImageApplet extends JApplet
        @Override
        public void init()
            try
                SwingUtilities.invokeAndWait(new Runnable()
                    @Override
                    public void run()
                        getContentPane().add(new BackgroundImage().getImagePanel());
            catch (InterruptedException e)
                e.printStackTrace();
            catch (InvocationTargetException e)
                e.printStackTrace();
    }

  • Using Photoshop images in Final Cut Pro 6

    when using photoshop images (drawn images not photos) in Final Cut Pro, why do they blur when rendered??  What settings should I use when creating the images in Photoshop CS2 to be compatible with FCP 6?

    You're in the wrong forum.
    For FCP 1 to 7 you need the Final Cut Studio forum.

  • Graphics, ImageIO, and 32-bit PNG images with alpha-channels

    I have a series of 32-bit PNG images, all with alpha channels. I'm using ImageIO.read(File) : BufferedImage to read the PNG image into memory.
    When I call graphics.drawImage( image, 0, 0, null ); I see the image drawn, however all semi-transparent pixels have a black background, only 100% transparent pixels in the source image are transparent in the drawn image.
    The Graphics2D instance I'm drawing to is obtained from a BufferStrategy instance (I'm painting onto an AWT Canvas).
    Here's my code:
    Loading the image:
    public static BufferedImage getEntityImage(String nom, String state) {
              if( _entityImages.containsKey(nom) ) return _entityImages.get( nom );
              String path = "Entities\\" + nom + "_" + state + ".png";
              try {
                   BufferedImage image = read( path );
                   if( image != null ) _entityImages.put( nom, image );
                   return image;
              } catch(IOException iex) {
                   iex.printStackTrace();
                   return null;
         private static BufferedImage read(String fileName) throws IOException {
              fileName = Program.contentPath + fileName;
              File file = new File( fileName );
              if( !file.exists() ) return null;
              return ImageIO.read( new File( fileName ) );
         }Using the image:
    Graphics2D g = (Graphics2D)_bs.getDrawGraphics();
    g.setRenderingHint( RenderingHints.KEY_ANTIALIASING , RenderingHints.VALUE_ANTIALIAS_ON);
    public @Override void render(RenderContext r) {
              Point p = r.v.translateWorldPointToViewportPoint( getLoc() );
              int rad = getRadius();
              int x = (int) p.x - (rad / 2);
              int y = (int) p.y - (rad / 2);
              BufferedImage image = Images.getEntityImage( getCls(), "F" );
              r.g.drawImage( image, x, y, null );
         }

    You may want to check on you system and see what ImageReaders are available, it could be ImageIO is just not picking the best one, if not, then you can use getImageReaders to get an iterator of image readers, then choose the more appropriate one.

  • Draw to Image like BufferedImage.createGraphics(), but NOT in FX2's thread

    Hi. I want to draw some shapes in fx2's Image. Canvas.shapshot() can not be run outside fx's own thread, what gives various trouble, like either out of order drawing or delays on semaphores, On top of that, the code is complex and slow -- all drawing is performed probably on just a single thread, and the app starts to behave suspiciously, like a snapshot to an image within Platform.runLater results in that image drawn elsewhere by fx2 as if it were transparent, even that the image should never be transparent.
    Is fx2 currently not able to do any concurrent plain drawing?

    >
    Is fx2 currently not able to do any concurrent plain drawing?Yes, this is currently the case. To my opinion this is a serious shortcoming of JFX2 which I have complained about already several times but nobody seems to care (except you :-)).
    Michael

  • Displaying Image in JFrame

    I was able to display an image in a JApplet by creating another class extended from JPanel.
    When I try to display the same image in my JFrame based application, it fails, although the code compiles alright.
    Can anyone give me a snippet of code to include in my application which can be used in conjunction with my extended JPanel?
    Thanks in advance.
    import java.awt.*;
    import javax.swing.JPanel;
    public class ImagePanel extends JPanel {
    Image image;
    public ImagePanel(Image img) { image = img; }
    public Dimension getPreferredSize() {
    return new Dimension(image.getWidth(this), image.getHeight (this)); }
    public void paint(Graphics gr) {
    gr.drawImage(image, 0, 0, this);
    }

    you can use a Label with an ImageIcon in it and it does not involve any overriding
    ex:-
    This example shoews ho to conver your ImagePanel using inage labels
    but with image label you will not need a seperate class called ImagePanel you can just use Labels
    and also normaly you dont override paint you override paintComponent
    import java.awt.*;
    import javax.swing.*;
    public class ImagePanel extends JPanel {
       ImageIcon image;
       public ImagePanel(Image img) {
          image = new ImageIcon(img);
          setLayout(new BorderLayout());
          add(new JLabel(image));
       public Dimension getPreferredSize() {
          return new Dimension(image.getWidth(), image.getHeight ());
    public void paint(Graphics gr) {
       gr.drawImage(image, 0, 0, this);
    }

  • Help please - Overlapping Images

    Hi, hope someone can help.
    I'm writing an application that requires a background image with multiple images drawn over the top. These images will be moved as options are selected.
    Can anyone provide an example of how to implement the Overlay layout manager to perform this as I'm having difficulty.
    Thanks in advance.

    Thanks,
    Any idea how to add the background image to the JPanel component.
    I've tried stuff as below but to no success and I'm just really lost and confused with all this.
    public class BoardPanel extends JPanel
    public BoardPanel()
    this.setPreferredSize(new java.awt.Dimension(500,500));
    this.setLayout(new javax.swing.OverlayLayout(this));
    public void paintComponent(Graphics g)
         super.paintComponent(g);
                   g.drawImage(backgroundImage,0,0,getWidth(), getHeight(), null);
    private Image backgroundImage = new ImageIcon("./board.jpg").getImage();
    In main init code:
    BoardPanel boardIcon = new BoardPanel();
    JPanel content = new JPanel();
    getContentPane().add(content, java.awt.BorderLayout.CENTER);
    content.add(boardIcon, java.awt.BorderLayout.CENTER);

Maybe you are looking for

  • How can I associate an A/P invoice to a service call?

    Hi, Customer wants this: 1. They (Co. A) gets a service call from their customer say for lump sum of 400 dollars. 2. They (Co. A)  give out a contract to technician say at 45 dollars an hours and travel expenses. This is SERVICE ITEM for a total expe

  • Soap to proxy scenario Getting exception caught with cause   error

    Hi Experts, MY scenario is soap to proxy i am  getting below exception message in advanced engine configuration in ICO. OAP: request message entering the adapter with user J2EE_GUEST 09/10/2014 11: 06: 03 346 XI Information Packaging (Bulk Mode) is n

  • Payroll Journal Import Error EF04

    Hi, we are working in oracle applications 11i (11.5.0) TEST Instance. As monthly operations the payroll personnel upload the salaries journal to Gl Interface with oracle web adi. We have oracle hrms full install. We are trying to setup and use the di

  • Cannot synchronize as "medium not found"

    I had a G2 (4GB) nano, worked well. Then we got a G3 nano (also 4 GB) and I connected it straight to my iTunes (didn't check before that it has to be under different user accounts Registered the new nano under another name, but somehow the whole proc

  • FixedLengthTooShortHandling--Not working

    Hi Group, I need to prevent one node writting into output file which is coming from Target structure. I have used FNAME.fieldFixedLengths 0 FNAME.FixedLengthTooShortHandling Cut in my Content Conversion. But its not working.Its giving error in adapte