Background image/reloading/closing applet

2 questions:
1) How do I put a background gif/jpg image on a frame window?
2) Is there a method or command that can restart or reload the current applet?
3) What's the best normal way to kill/exit the applet? (System.exit() ?)
What about browser, how do I close the applet in the browser.
Appreciate any help.
Regards,
Helix
http://www27.brinkster.com/helixical

I think if you understand Applet's life cycle clearly you'll find answers to questions 2 and 3:
init() - initializes the applet for the first time.
start() - starts the applet after initialization and after every time it was stopped. (answer for your Q2)
paint() - does the actual painting of the applet.
stop() - stops the applet (kind of temporary), can be restarted anytime.
destroy() - kills the applet once for all. (answer for your Q3, call this whenever you want the applet to be destroyed).
answer to Q1, try the following:
in init():
MediaTracker tracker = new MediaTracker (this);
bgImage = getImage (new URL(getCodeBase(), getParameter("bgImage")));
tracker.addImage (bgImage, 0);
tracker.waitForAll();
public void update( Graphics g) {
paint(g);
public void paint(Graphics g) {
if(bgImage != null) {
int x = 0, y = 0;
while(y < size().height) {
x = 0;
while(x< size().width) {
g.drawImage(bgImage, x, y, this);
x=x+bgImage.getWidth(null);
y=y+bgImage.getHeight(null);
else {
g.clearRect(0, 0, size().width, size().height);
happy trying...
iDriZ

Similar Messages

  • Add a background image to applet

    Hi. Sorry if this question has been asked to death, but i have searched for the best part of the last 2 hours for a solution to my problem which is as follows:
    I have been tying to place a background image on an applet for part of a project i have to do at uni. From what i have read this is very simple and i have tried all possiblities to get it working, all to no avail.
    The code below is what i have for this:
    import java.awt.*;
    import java.applet.*;
    public class BackImage extends Applet
    Image background;
    public void init()
    background = getImage(getCodeBase(), "Images/back.gif");
    setVisible(true);
    public void paint(Graphics g)
    g.drawImage(background, 0, 0, this);
    When using textpad to compile and run this, the command window opens and closes instantly and the applet window doesnt even open. when opening the html file in firefox, all i am greeted with is a white applet area but no error messages in the console.
    I have checked and checked again that locations for the image are correct and all seems fine, so i put it to you guys to help me if you could.
    thanks
    =============
    S.Harvey

    1. Switch from the AWT to Swing.
    2. My favorite way it to draw the image with a border. That way I can
    decorate an existing container without having to subclass it. Have fun!
    import java.awt.*;
    import java.io.*;
    import java.net.URL;
    import javax.imageio.*;
    import javax.swing.*;
    import javax.swing.border.*;
    public class BackgroundBorderExample {
        public static void main(String[] args) throws IOException {
            JFrame.setDefaultLookAndFeelDecorated(true);
            JFrame f = new JFrame("BackgroundBorderExample");
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JTextArea area = new JTextArea(24,80);
            area.setForeground(Color.WHITE);
            area.setOpaque(false);
            area.read(new FileReader(new File("BackgroundBorderExample.java")), null);
            final JScrollPane sp = new JScrollPane(area);
            sp.setBackground(Color.BLACK);
            sp.getViewport().setOpaque(false);
            f.getContentPane().add(sp);
            f.setSize(600,400);
            f.setLocationRelativeTo(null);
            f.setVisible(true);
            String url = "http://blogs.sun.com/jag/resource/JagHeadshot.jpg";
            final Border bkgrnd = new CentredBackgroundBorder(ImageIO.read(new URL(url)));
            Runnable r = new Runnable() {
                public void run() {
                    sp.setViewportBorder(bkgrnd);
                    sp.repaint();
            SwingUtilities.invokeLater(r);
    import java.awt.*;
    import java.awt.image.*;
    import javax.swing.border.*;
    public class CentredBackgroundBorder implements Border {
        private final BufferedImage image;
        public CentredBackgroundBorder(BufferedImage image) {
            this.image = image;
        public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
            int x0 = x + (width-image.getWidth())/2;
            int y0 = y + (height-image.getHeight())/2;
            g. drawImage(image, x0, y0, null);
        public Insets getBorderInsets(Component c) {
            return new Insets(0,0,0,0);
        public boolean isBorderOpaque() {
            return true;
    }

  • Background image not display in applet?

    Hi all,
    I try to display a image to applet as demos of oracle forms (reusable_calendar) but it can not.
    I add this text (AliasMatch ^/forms90/images/(..*) "C:\Ora92DS/forms90/Images/$1") into forms90.conf where C:\Ora92DS/forms90/Images/ contents my background image.
    Then I modify background=backgrnd.gif the formsweb.cfg file but the applet also do not display the background image.
    I also check the registry.dat file with
    default.icons.iconpath=
    default.icons.iconextension=gif
    I am need your helps.
    Thanks

    Hi,
    add /forms90/images/ as the default.icons.iconpath= value
    Frank

  • Firefox 4.0: Improper handling of Animated Gif background-image

    FF 4.0 is giving erratic and incorrect displays of an animated gif on a project I am working on. I have prepared a very small sample that demonstrates the problem.
    The problem occurs when an animated gif is used as the background-image for a div (it may also be true when used as a background-image for the body, but I have not tested that).
    When a page is first loaded, the animated gif displays properly.
    I would expect that the animation be displayed as animated either:
    # On each page load
    # On a page load with new session or when the image is removed from cache prior to loading the page. Otherwise the last frame of the image would show
    The sample page is designed to test this.
    IE: Behaved as in #1, i.e. the image was animated on each and every page load. (IE 8: 8.0.6001....)
    Google Chrome: Behaved as in #2, i.e. the image is animated only when there is a new session or when the image is no longer in cache. (Version 10.0.648.204)
    FF 3.6.8: Slightly strange, but acceptable.
    * The image is animated on new session and on any reload button.
    * The last frame is displayed if the location is reentered in the URL bar.
    * The last frame is displayed if the back/forward navigation buttons are used.
    * SOMETIMES the image is animated and sometimes the last frame is displayed when the change page button is pressed (i.e. Javascript change page).
    FF 4.0: Just plain NOT acceptable
    * Correctly animates the image on page load for new session
    * Correctly animates the image on reload button following clearing the image from cache.
    * INCORRECTLY shows the FIRST gif frame if the reload button is pressed.
    * INCORRECTLY shows the FIRST gif frame if the URL is reentered from the URL bar.
    * INCORRECTLY shows the FIRST gif frame if the page change button is pressed (i.e. Javascript change page).
    * INCORRECTLY shows the FIRST gif frame if theURL is reentered from the URL bar after clearing the image from cache.
    * INCORRECTLY shows the FIRST gif frame if the page change button is pressed (i.e. Javascript change page) after clearing the item from cache.
    All of these tests were run with Windows XP-Pro (all service packs and updates applied).
    I can find no clear specification as to what ''should'' happen with pages using animated gifs that are already loaded.
    * I can conceive of rationales for always displaying with animation.
    * I can also conceive of rationales for sometimes displaying the last frame, especially if the same page is being reloaded since many sites reload the same page in response to user form submissions.
    # '''I can see no rationale for displaying the first frame of the gif and would suggest that this is a bug. '''

    Can be this bug:
    * [https://bugzilla.mozilla.org/show_bug.cgi?id=641198 Bug 641198] – Rollover animated gif show only one frame.
    You can try these nightly test builds to see if they behave better:
    Fx5.0 ftp://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora
    Fx6.0 ftp://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-central
    Create a new profile exclusively for each Firefox version and create a desktop shortcut with -P "profile" appended to the target to launch each Firefox version with its own profile.
    See these mozillaZine KB articles for information:
    * http://kb.mozillazine.org/Testing_pre-release_versions
    * http://kb.mozillazine.org/Creating_a_new_Firefox_profile_on_Windows
    * http://kb.mozillazine.org/Shortcut_to_a_specific_profile
    * http://kb.mozillazine.org/Using_multiple_profiles_-_Firefox

  • 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();
    }

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

  • Safari does not display my background-image from my CSS

    I am creating a web site in which I want an image to be seen in the backgound with the text "floating" over it. The code is listed below.
    /* CSS Document */
    a{text-decoration:none}
    body {
    background-image:url(images3/greywolf1.jpg);
    background-attachment:fixed;
    background-position:top right;
    background-repeat:no-repeat;
    height:100%;
    The image can be seen in IE, Netscape and Firefox but not in Safari. Is there a trick to this for Safari or does Safari not support this?
    You can view the current page I am working on at:
    www.killeenisd.org/shoemakerhs/main.html
    Thanks for anyy help you can give me.
    qtmouser

    Thank you. Though there was a closing brace on the body message, I ended up retyping the entire script and it worked.

  • Background image in extended awt.Button doesn't show.

    Hi all
    I have an applet that has only an awt.Button visible on the page. Because of layout requirements I need to style that button with a background image. I have extended the java.awt.Button like this:
         class ImageButton extends Button {
              public void paint(Graphics g) {
                   super.paint(g);
                   g.drawImage(getImage(getDocumentBase(), "../img/loadSertificate.jpg"),
                             0, 0, null);
         }and use the extended:
         public void init() {
              mSignButton = new ImageButton();
              mSignButton.setLocation(0, 0);
              Dimension appletSize = this.getSize();
              mSignButton.setSize(appletSize);
              mSignButton.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent e) {
                        signSelectedFile();
              this.setLayout(null);
              this.add(mSignButton);
         }Now everiting is ok but when the applet is loaded the background image doesn't show and only a plain gray button is visible. The interesting part is that the image does show after I click somewhere in the browser's window and later on it's always visible as expected.
    Below is part from the log from the java console:
    basic: Applet started
    basic: Told clients applet is started
    Loaded image: http://ip:8080/UserManagement/img/loadSertificate.jpg
    network: Cache entry found [url: http://ip:8080/UserManagement/img/loadSertificate.jpg, version: null]
    network: Connecting http://ip:8080/UserManagement/img/loadSertificate.jpg with proxy=DIRECT
    network: Connecting http://ip:8080/UserManagement/img/loadSertificate.jpg with cookie "JSESSIONID=8A0936441BDA3215A10D9798742C4685"
    network: CleanupThread used 39850 us
    network: ResponseCode for http://ip:8080/UserManagement/img/loadSertificate.jpg : 304
    network: Encoding for http://ip:8080/UserManagement/img/loadSertificate.jpg : null
    network: Disconnect connection to http://ip:8080/UserManagement/img/loadSertificate.jpg
    Loaded image: http://ip:8080/UserManagement/img/loadSertificate.jpgAny suggestions how to fix this issue?!
    Edited by: factor5 on Nov 12, 2009 1:27 AM
    Edited by: factor5 on Nov 12, 2009 1:28 AM

    xmm sry but this was a forgotten repaint() :
              public void paint(Graphics g) {
                   // call super's paint method
                   super.paint(g);
                   g.drawImage(getImage(getDocumentBase(), APPLET_BUTTON_IMAGE_URL),
                             0, 0, null);
                   repaint();
              }Now it seems to work fine.
    Edited by: factor5 on Nov 12, 2009 1:44 AM

  • Background image not displaying

    I'm developing pages that will each have a different background image. i've defined a div with the bg image in it and put that div in the code, but the bg image doesn't show up. i've also tried adding a bg color to the div and that doesn't show up either, so i'm sure it's not a path or file name issue. css & code below.
    @import url("./whitespace-reset.css");
    @charset "UTF-8";
    body  {
        margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
        padding: 0;
        text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
        color: #000000;
        font-family: Verdana, Arial, Helvetica, sans-serif;
    #container  {
        width: 761px; /* the auto margins (in conjunction with a width) center the page */
        border: 0;
        text-align: left; /* this overrides the text-align: center on the body element. */
        height: 871px;
        margin: 0;
        padding: 0;
        background: #FFFFFF;
    #header  {
        height: 148px;
        width: 761px;
        padding: 0px 0px 0px 0px;
        margin: 0px 0px 0px 0px;
    #leftside {
        width: 158px;
        float: left;
        margin-top: -38px;
        padding: 0px 0px 0px 0px;
    #leftside .menu img {
        display: block;
        margin: 0;
    #leftside  ul.menu {
        padding: 0px 0px 0px 0px;
        font-style: none;
        margin: 0;
    #leftside ul.menu li {
        display: inline;
        float: left;
        margin: 0;
        padding: 0;
        list-style: none;
    #leftspacer {
        width: 31px;
        float: left;
        height: 723px;
        margin-top: -38px;
        padding-right: 10px;
        background-image: url(images/home_spacer_left.jpg);
        background-repeat: no-repeat;
    #top  {
        margin-top: 0px;
        height: 38px;
        padding: 0px 0px 0px 0px;
    #top ul.menu {
        margin-top: 0px;
        margin-left: 189px;
        float: left;
        padding: 0px 0px 0px 0px;
        margin-right: 0px;
        margin-bottom: 0px;
        list-style: none;
    #top ul.menu li {
        display: inline;
        list-style: none;
        float: left;
        margin: 0;
        padding: 0;
    #bottom {
        height: 22px;
        left: 468px;
    #bottom ul.menu {
        margin-top: 300px;
        margin-right: -23px;
        float: left;
        margin-left: -61px;
        list-style: none;
    #bottom ul.menu li {
        display: inline;
        list-style: none;
        float: left;
    #mainContent  {
        margin: 0px 0px; /* the right and left margins on this div element creates the two outer columns on the sides of the page. No matter how much content the sidebar divs contain, the column space will remain. You can remove this margin if you want the #mainContent div's text to fill the sidebar spaces when the content in each sidebar ends. */
        padding: 0 0 0 0;
    #facilitiesContent {
        background: #990000 url(images/facilities_bg.jpg) repeat;
        padding: 0;
        height: 208px;
        margin: 0;
        width: 573px;
    #footer  {
        padding: 0; /* this padding matches the left alignment of the elements in the divs that appear above it. */
        background:#c0b7b2;
        height: 22px;
    #threepix {
        margin-left: 189px;
        margin-right: 0px;
        height: 114px;
    #col1 {
        position: relative;
    #col1-a {
        position: absolute;
        width: 275px;
        right: 0px;
        top: 0px;
    #col1-b {
        position: absolute;
        right: 0px;
        width: 275px;
        top: 0px;
    #pixcopyleft {
        margin-left: 189px;
        font-size: 1em;
        font-family: Arial, Helvetica, sans-serif;
        margin-top: 10px;
    #pixcopyright {
        font-size: 1em;
        margin-left: 189px;
        font-family: Arial, Helvetica, sans-serif;
        margin-top: 10px;
    #footer ul.menu {
        margin-left: 189px;
        margin-right: 0px;
        margin-top: -22px;
        padding: 0px 0px 0px 0px;
        float: left;
    #footer ul.menu li {
        display: inline;
        list-style: none;
        padding: 0px 0px 0px 0px;
        float: left;
    #footer  p  {
        margin: 0; /* padding on this element will create space, just as the the margin would have, without the margin collapse issue */
        padding: 10 0;
    img.imageleft {
        float: left;
        margin-left: 0px;
        padding: 5px 5px 5px 5px;
    img.imageright {
        float: right;
        padding: 5px 0px 5px 5px;
        text-align: right;
    .imagecenter {
        text-align: center;
    .fltrt { /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
        float: right;
        margin-left: 0px;
        padding: 5px 5px 5px 5px;
    .fltlft { /* this class can be used to float an element left in your page */
        float: left;
        margin-right: 8px;
    .clearfloat { /* this class should be placed on a div or break element and should be the final element before the close of a container that should fully contain a float */
        clear:both;
        height:0px;
        font-size: 1px;
        line-height: 0px;
    h1 {
        font-family: Arial, Helvetica, sans-serif;
        font-size: 1em;
        font-weight: bold;
        margin-bottom: 3px;
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Core PIlates Studio </title> 
    <link href="core.css" rel="stylesheet" type="text/css" /> 
    <body bgcolor="#c0b7b2" onload="MM_preloadImages('images/nav_main_ourteam_roll.jpg')"> 
    <!--[if IE 5]> 
    <style type="text/css"> 
    /* place css box model fixes for IE 5* in this conditional comment */ 
    .thrColFixHdr #sidebar1 { width: 180px; } 
    .thrColFixHdr #sidebar2 { width: 190px; } 
    </style> 
    <![endif]--><!--[if IE]> 
    <style type="text/css"> 
    /* place css fixes for all versions of IE in this conditional comment */ 
    .thrColFixHdr #sidebar2, .thrColFixHdr #sidebar1 { padding-top: 30px; } 
    .thrColFixHdr #mainContent { zoom: 1; } 
    /* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */ 
    </style> 
    <![endif]--> 
    <script type="text/javascript"> 
    <!-- 
    function MM_swapImgRestore() { //v3.0 
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; 
    function MM_preloadImages() { //v3.0 
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); 
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) 
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} 
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    //-->
    </script>
    <meta name="description" content="Core Pilates Studio is a classical, fully equipped pilates and Gyrotonic studio convenienly located near Vassar College in Poughkepsie, NY. We offer classical pilates, Gyrotonic and Gyrokinesis in private, semi-private and group sessions." />
    <meta name="keywords" content="core pilates studio, pilates, core, gyrotonic, gryokinesis, joeseph pilates, pilates in poughkeepsie, pilates in ny, pilates in new york" />
    </head>
    <body onload="MM_preloadImages('images/nav_main_home_roll.jpg','images/nav_main_programs_roll.j pg','images/nav_main_schedule_roll.jpg','images/nav_main_rates_roll.jpg','images/nav_main_ ourteam_roll.jpg','images/nav_main_contactus_roll.jpg')">
    <div id="container">
       <div id="header">   
        <img src="images/home_header.jpg" align="left" /><a href="index.html"><img src="images/home_logo_core.jpg"></a>     
      <!-- end #header --></div>
    <div id ="top">
      <ul class="menu">
          <li><a href="facilities.html"><img src="images/subnav_studio_facilities_down.jpg" class="menu"></a></li>
           <li><a href="rates.html"><img src="images/subnav_studio_rates_up.jpg" class="menu"></a></li>
           <li><a href="hours.html"><img src="images/subnav_studio_hours_up.jpg" class="menu"></a></li>
           <li><a href="policies.html"><img src="images/subnav_studio_polocies_up.jpg" class="menu"></a></li>
           <li><a href="directions.html"><img src="images/subnav_studio_directions_up.jpg" class="menu"></a></li>
           <li><a href="contact-us.html"><img src="images/subnav_studio_contactus_up.jpg" class="menu"></a></li>
           <li><img src="images/subnav_studio_back.jpg" class="menu"></li>
      </ul>
      <!-- end #"top" --></div>
      <div id="leftside">
    <ul class="menu">
          <li><a href="index.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('home','','images/nav_main_home_roll.jpg',1)"><img src="images/nav_main_home_up.jpg" name="home" width="158" height="39" border="0" id="home" /></a></li>
          <li><a href="programs.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('programs','','images/nav_main_programs_roll.jpg',1)"><img src="images/nav_main_programs_up.jpg" name="programs" width="158" height="39" border="0" id="programs" /></a></li>
          <li><a href="the-studio.html"><img src="images/nav_main_thestudio_down.jpg"></a></li>
          <li><a href="schedule.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('schedule','','images/nav_main_schedule_roll.jpg',1)"><img src="images/nav_main_schedule_up.jpg" name="schedule" width="158" height="39" border="0" id="schedule" /></a></li>
          <li><a href="rates.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('rates','','images/nav_main_rates_roll.jpg',1)"><img src="images/nav_main_rates_up.jpg" name="rates" width="158" height="39" border="0" id="rates" /></a></li>
          <li><a href="contact-us.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('contact us','','images/nav_main_contactus_roll.jpg',1)"><img src="images/nav_main_contactus_up.jpg" name="contact us" width="158" height="39" border="0" id="contact us" /></a><a href="our-team.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('our team','','images/nav_main_ourteam_roll.jpg',1)"><img src="images/nav_main_ourteam_up.jpg" name="our team" width="158" height="39" border="0" id="our team" /></a></li>
          <li><img src="images/nav_main_space_below.jpg" /></li>
          <li><a href="mailto:[email protected]"><img src="images/home_email.jpg" /></a></li>
          <li><img src="images/home_address.jpg" /></li>
          <li><a href="special-programs.html"><img src="images/home_logo_special.jpg" /></a></li>
       </ul>
    <!-- end #leftside --></div>
    <div id="leftspacer"></div>
    <div id="facilitesContent">
    <div id="pixcopyright"><img src="images/images/facilaties_page_images_03.jpg" class="imageright">
          <h1 align="right">What is Pilates?</h1>
          <div align="right">Whether you're a world class athlete, a couch potato, recovering from an injury, new to excercising, old, young or in between you can benefit from Pilates.</div></div><br /><br />
        <div id="pixcopyright"><img src="images/images/facilaties_page_images_03.jpg" class="imageright">
        <h1 align="right">What is Pilates?</h1>
           <div align="right">Whether you're a world class athlete, a couch potato, recovering from an injury, new to excercising, old, young or in between you can benefit from Pilates.</div></div><br /><br />
      <!-- end #facilitiesContent --></div>
      <!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats --><br class="clearfloat" />
    <div id="footer">
       <ul class="menu"> 
           <li><img src="images/nav_bottom_left_space.jpg"></a></li>
           <li><a href="index.html"> <img src="images/nav_bottom_home.jpg"></a></li>
           <li><a href="programs.html"> <img src="images/nav_bottom_program.jpg"></a></li>
           <li><a href="the-studio.html"> <img src="images/nav_bottom_thestudio.jpg"></a></li>
           <li><a href="schedule.html"> <img src="images/nav_bottom_schedule.jpg"></a></li>
           <li><a href="rates.html"> <img src="images/nav_bottom_rates.jpg"></a></li>
           <li><a href="our-team.htm"> <img src="images/nav_bottom_ourteam.jpg"></a></li>
           <li><a href="contact-us.html"> <img src="images/nav_bottom_contactus.jpg"></a></li>
       </ul>
      <!-- end #footer --></div> 
    <!-- end #container --></div>
    </body>
    </html>

    Start by fixing the code errors.
    http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.elixir.biz%2Fcore%2Ffacilitie s.html
    http://jigsaw.w3.org/css-validator/validator?profile=css21&warning=0&uri=http%3A%2F%2Fwww. elixir.biz%2Fcore%2Ffacilities.html
    Your document type doesn't match your HTML closing tags.  Modify > Page properties > Encoding > choose either HTML or XHTML (transitional) and hit Apply.
    Images require an alt attribute for better web accessibility. If you want to skip this for now and add them later, that's OK.
    but your code won't validate until you add them to each image.
    When you've fixed the code errors, repbulish the page and see if that fixes the problem.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb
    http://alt-web.blogspot.com

  • Different background color when loading applets

    I can't find the information for when a browser loads an applet, to change the background color while the applet is loading.
    I know there are other "optional" applet tags as well, but I can't find the information.
    Any help is appreciated.

    Also to get rid of the java cup image
    <PARAM NAME="image" VALUE="" />
    Or you can replace the value with a real image of your own

  • Background image overridden

    CSS in a table:
    I have a table with background images but I get a white
    background
    on the last line. I can´t work out why-I have got rid of
    the background color and tried to have a background transparent
    which worked for the radio buttons but the text input and the text
    next to it still have a white background. How can I get rid of the
    background? htpp://www.britishalliance.com/test.html Thanks for any
    pointers

    1. Error Line 63 column 7: end tag for element "STYLE" which
    is not open.
    Probably means that this line is improper syntax -
    <STYLE type=text/css> - should be - <STYLE
    type="text/css">
    That may fix the next several errors about end tags.
    This code is badly mangled -
    <div id="idioma">
    <TABLE width=586 border=0 align="center" cellPadding=0
    cellSpacing=0>
    <TBODY>
    <TR>
    <TD vAlign=bottom colSpan=2 height=10><IMG
    height=10
    src="images/borderTL.gif" alt="backgroundtopleft" width=10
    border=0></TD>
    <TD height=10 vAlign=bottom style="BACKGROUND:
    url(images/box_edge_t.gif) repeat-x"></TD>
    <TD vAlign=bottom colSpan=2><IMG height=10
    src="images/borderTR.gif" alt="backgroundtopright" width=15
    border=0></TD></TR>
    <TR>
    <TD width=5 height=79 rowspan="2" align=left
    style="BACKGROUND: transparent
    url(images/box_edge_l.gif) repeat-y"></TD>
    <TD width=5
    height=79 rowspan="2" vAlign=top style="BACKGROUND:
    transparent
    url(images/box_bg.gif) repeat-x"></TD>
    <TD height=22 vAlign=top style="BACKGROUND: transparent
    url(images/box_bg.gif) repeat-x">
    <FORM name=adduser action=confirma.cfm method=post>
    <H1 align="center">Que idioma usted quiere
    aprender?</H1></DIV>
    You cannot span into a table as you have with that <div
    id="idioma">. In
    addition, the <form> tag opens in one <td> and
    closes outside of the closing
    </table> - that's also improper nesting.
    Fix those and you may trap all your errors. Take a look at
    the code
    coloring in DW's code view. Anything that is yellow is a
    problem.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Hydrowizard" <[email protected]> wrote in
    message
    news:[email protected]...
    > Hi Murray,
    > I hve been trying to change the errors presneted in the
    validator. I
    > have
    > done all I can at this stage - I just don?t understand
    why it is flaging
    > tags
    > and saying that there isn?t a closing tag when there is.
    What is wrong
    > with
    > <body> anyway?!!
    > I then tried with XHTML 1.0 Transitional but that gave
    me 157 errors so I
    > changed back to HTML 4.01 Transitional!!
    > Should I use another doctype-maybe strict 4.01?
    > Thanks for any pointers!
    >
    >
    http://validator.w3.org/check?verbose=1&uri=http://www.britishalliance.com/test.
    > html
    >

  • Overlapping images in an applet

    Hello,
    I'm a Java beginner and I would like to write a small applet for a web page. My goal is the following:
    The webpage has a background image. So far no problem.The applet should also show a small menu- which is also no greater problem.
    Further on, every time the mouse cursor is rolling over a menu image, another image should be displayed overlapping the background image.
    This is a problem, because I cannot remove the displayed image without
    repainting the entire background image.
    I am looking for a method, which can store a well defined image area so I can restore it later.
    Thank you for any help !
    Stephan

    Put your images (rollover or whatever) on a new component - in swing you can use a JLabel - or, I'll assume awt here as its an applet, you can use a Panel. eg
    MouseEntered()
    inside your area
    add(myPanel)
    MouseExited()
    your area
    remove(myPanel)
    In the panel you'll need to explicity call on java.awt.Graphics with
    Graphics g = myPanel.getGraphics();

  • Using Java Advanced Imaging (JAI) in Applet

    I'm trying to port a JAI user interface to an applet using Apache Tomcat. When I try to display an image in the applet I get an exception and I have no idea what the cause is. I've opened up security completely (temporarily) to ensure that I'm not getting an error due to an applet security issue. Consequently, I'm able to browse/open files from the client.
    Here is the stack for the error I'm getting. Can anyone tell me what is causing this error? Thanks.
    Java(TM) Plug-in: Version 1.4.1_01
    Using JRE version 1.4.1_01 Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\Administrator
    Proxy Configuration: No proxy
    c:   clear console window
    f:   finalize objects on finalization queue
    g:   garbage collect
    h:   display this help message
    l:   dump classloader list
    m:   print memory usage
    o:   trigger logging
    p:   reload proxy configuration
    q:   hide console
    r:   reload policy configuration
    s:   dump system properties
    t:   dump thread list
    v:   dump thread stack
    x:   clear classloader cache
    0-5: set trace level to <n>
    java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at javax.media.jai.FactoryCache.invoke(FactoryCache.java:130)
         at javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1669)
         at javax.media.jai.ThreadSafeOperationRegistry.invokeFactory(ThreadSafeOperationRegistry.java:481)
         at javax.media.jai.registry.RIFRegistry.create(RIFRegistry.java:340)
         at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:805)
         at javax.media.jai.RenderedOp.createRendering(RenderedOp.java:853)
         at javax.media.jai.RenderedOp.getWidth(RenderedOp.java:2135)
         at com.abi.protmodule.GelDisplayData.getGelImage(GelDisplayData.java:558)
         at com.abi.protmodule.ScrollingGelPanel.<init>(ScrollingGelPanel.java:58)
         at com.abi.ris.web.applet.GelEditPanel.showGelImage(GelEditPanel.java:76)
         at com.abi.ris.web.applet.GelEditApplet.openGelJButton_actionPerformed(GelEditApplet.java:159)
         at com.abi.ris.web.applet.GelEditApplet.chooseFileJButton_actionPerformed(GelEditApplet.java:136)
         at com.abi.ris.web.applet.GelEditApplet$1.actionPerformed(GelEditApplet.java:73)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1764)
         at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1817)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:419)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
         at java.awt.Component.processMouseEvent(Component.java:5093)
         at java.awt.Component.processEvent(Component.java:4890)
         at java.awt.Container.processEvent(Container.java:1566)
         at java.awt.Component.dispatchEventImpl(Component.java:3598)
         at java.awt.Container.dispatchEventImpl(Container.java:1623)
         at java.awt.Component.dispatchEvent(Component.java:3439)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3165)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
         at java.awt.Container.dispatchEventImpl(Container.java:1609)
         at java.awt.Component.dispatchEvent(Component.java:3439)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
    Caused by: java.lang.NoSuchFieldError: borders
         at com.sun.medialib.mlib.Image.initIDs(Native Method)
         at com.sun.medialib.mlib.Image.<clinit>(Image.java:2903)
         at com.sun.media.jai.mlib.MediaLibAccessor$1.run(MediaLibAccessor.java:223)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.media.jai.mlib.MediaLibAccessor.setUseMlib(MediaLibAccessor.java:220)
         at com.sun.media.jai.mlib.MediaLibAccessor.useMlib(MediaLibAccessor.java:185)
         at com.sun.media.jai.mlib.MediaLibAccessor.isMediaLibCompatible(MediaLibAccessor.java:391)
         at com.sun.media.jai.mlib.MediaLibAccessor.isMediaLibCompatible(MediaLibAccessor.java:314)
         at com.sun.media.jai.mlib.MlibScaleRIF.create(MlibScaleRIF.java:82)
         ... 39 more
    Could not find mediaLib accelerator wrapper classes. Continuing in pure Java mode.

    look at
    http://forum.java.sun.com/thread.jsp?thread=290960&forum=20&message=1261471
    and
    http://forum.java.sun.com/thread.jsp?forum=20&thread=173410
    It's something related with DLL libraries...

  • Loading an image in an applet

    I am trying to load and display an existing image to my applet and break the image up into segments to allow the pieces to be moved into their correct position. However it is only getting as far as cutting the image up but it does not complete loading the image. Below is the run() method im using to load it:
    public void run()
            int i;
            MediaTracker trackset;              // Tracker for images
            Image WholeImage;                 // The whole image
                        Image ResizedImage;
            ImageFilter filter;
         // Determine the size of the applet
         r = getSize();
            // Load up the image
            if (getParameter("SRC") == null)
              Error("Image filename not defined.");
         WholeImage = getImage(getDocumentBase(), getParameter("SRC"));
         // Scale original image if needed
            // Make the image load completely and put the image
            // into the track set.  Where it waits in paint() method.
            trackset = new MediaTracker(this);
            trackset.addImage(WholeImage, 1);
            // Mix up the puzzle
            System.out.println("Mixing puzzle.");
            PaintScreen = 2;
            repaint();
            try {
            Thread.sleep(100);
         } catch (InterruptedException e) {
            // Tell user of the wait for image loading
           //Trap trackset exceptions that track if the image
           //hasn't loaded properly and output to the user.
            PaintScreen = 0;
            repaint();
            try {
            Thread.sleep(100);
         } catch (InterruptedException e) {
            try {
               trackset.waitForID(1);
            } catch (InterruptedException e) {
               Error("Loading Interrupted!");
            // Check if image loaded up correctly
            //Where is image is held in the same directory
            //as the HTML file use getImage method to pass
            //getDocumentBase(), taking in the getParameter.
            if (WholeImage.getWidth(this) == -1)
                 PaintScreen = 3;
                 repaint();
                 WholeImage = getImage(getDocumentBase(), getParameter("SRC"));
                 trackset = new MediaTracker(this);
                 trackset.addImage(WholeImage, 1);
                 try {
                    trackset.waitForID(1);
                 } catch (InterruptedException e) {
                    Error("Loading Interrupted!");
                 if (WholeImage.getWidth(this) == -1)
                      PaintScreen = 4;
                      repaint();
                      stop();
                      return;
         // Resize picture if needed.
         int ResizeOption = integerFromString(getParameter("RESIZE"));
         if ((r.width != WholeImage.getWidth(this) ||
              r.height != WholeImage.getHeight(this)) &&
                ResizeOption != 0)
              if (ResizeOption == 2)
                ResizedImage =
                  WholeImage.getScaledInstance(r.width, r.height - TOP_MARGIN,
                                     WholeImage.SCALE_FAST);
              else if (ResizeOption == 3)
                ResizedImage =
                  WholeImage.getScaledInstance(r.width, r.height - TOP_MARGIN,
                                     WholeImage.SCALE_SMOOTH);
              else if (ResizeOption == 4)
                ResizedImage =
                  WholeImage.getScaledInstance(r.width, r.height - TOP_MARGIN,
                                     WholeImage.SCALE_AREA_AVERAGING);
              else
                ResizedImage =
                  WholeImage.getScaledInstance(r.width, r.height - TOP_MARGIN,
                                     WholeImage.SCALE_DEFAULT);
              trackset.addImage(ResizedImage, 2);
              PaintScreen = 5;
              repaint();
              try {
              Thread.sleep(100);
              } catch (InterruptedException e) {
              try {
              trackset.waitForID(2);
              } catch (InterruptedException e) {
              Error("Loading Interrupted!");
              WholeImage = ResizedImage;
            // Complete loading image.  Start background loading other things
            // Also put image into the Graphics class
            // Split up main image into smaller images
            PaintScreen = 1;
            repaint();
            try {
               Thread.sleep(100);
            } catch (InterruptedException e){}
            piecewidth = WholeImage.getWidth(this) / piecesx;
            pieceheight = WholeImage.getHeight(this) / piecesy;
            System.out.println("Image has loaded.  X=" +
                               WholeImage.getWidth(this) + " Y=" +
                               WholeImage.getHeight(this));
            imageset = new Image[totalpieces];
            for (i = 0; i < totalpieces; i++)
                 filter = new CropImageFilter(GetPieceX(i) * piecewidth,
                                              GetPieceY(i) * pieceheight,
                                              piecewidth, pieceheight);
                 imageset[i] = createImage(new
                                           FilteredImageSource(WholeImage.getSource(),
                                                               filter));
            // Set up the mouse listener
            System.out.println("Adding mouse listener.");
            addMouseListener(this);
            // Complete mixing the image parts
            System.out.println("Displaying puzzle.");
            PaintScreen = -1;
            repaint();
            while (end != null)
              try {
                 Thread.sleep(100);
              } catch (InterruptedException e){}
         }Any help to where im going wrong would be much appreciated. Thanks!

    ive seen this one many times and it dosent work for me! Shouldnt the second parameter of the getImage(...) method not include the 'http://..." part as that what getDocumentBase() is for, returning the URL of the page the applet is embedded in? I have tried using code like this and event getting a printout of the doc/code base into the console to make sure my images are in the right place (.gif images), and nothing's happening, null pointer every time!
    {code}
    Image image;
    public void init() {
    // Load image
    image = getImage(getDocumentBase(), "http://hostname/image.gif");
    public void paint(Graphics g) {
    // Draw image
    g.drawImage(image, 0, 0, this);
    {code}
    ps this code is from the site mentioned above
    Edited by: Sir_Dori on Dec 8, 2008 8:37 AM

  • Template - background image missing

    Hi I'm sorry to be back but I have another problem that I don't seem to be able to solve.  I have looked at similar posts online,  but don't seem to have found the answer. 
    I have created a template from Dreamweavers blank templates.  I have made ONLY TWO CHANGES to the blank template.  I've added a background image, and removed the background colour from the .body element. I'm hoping this will help isolate my mistake.
    When I create a new page from this template the background image does not display.  I've noticed that the image path is changed in the child page - whereas the template displays the relative path, the full path is given in the child.  I don't know if this is part of the problem?
    The problem occurs both when I preview the site through a browser, as well as online. 
    I know I should be using templates for site-building, so need to know what I'm doing wrong here.  Many thanks, and please remember that I'm a novice so put it very simply so that I can grasp what your saying! 
    http://www.gillwykes.com/development/frank_test/testpage2.html
    Thanks!

    I just tried a different approach.  Created a new site, through Site Manager.  Created an new HTML paged and did Save as Template.  I then added an image ( which is stored in the images folder in the site) as a background through Page Properties.  I saved and closed the template, and did File, New Page from Template.  The image did not display, and the path to the image was changed.  Here is the code.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!-- TemplateBeginEditable name="doctitle" -->
    <title>Untitled Document</title>
    <!-- TemplateEndEditable -->
    <!-- TemplateBeginEditable name="head" -->
    <!-- TemplateEndEditable -->
    <style type="text/css">
    body {
              background-image: url(../images/Copy%20of%20IMG_2481.jpg);
    </style>
    </head>
    <body>
    </body>
    </html>
    and
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/test1.dwt" codeOutsideHTMLIsLocked="false" -->
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!-- InstanceBeginEditable name="doctitle" -->
    <title>Untitled Document</title>
    <!-- InstanceEndEditable -->
    <!-- InstanceBeginEditable name="head" -->
    <!-- InstanceEndEditable -->
    <style type="text/css">
    body {
              background-image: url(file:///C|/Documents and Settings/admin/My Documents/1DREAMWEAVER/1_IN_PROGRESS/template_test/images/Copy%20of%20IMG_2481.jpg);
    </style>
    </head>
    <body>
    </body>
    <!-- InstanceEnd --></html>
    I'm obviouly missing something along the line.  It can't be a glitch in CS5.5 because it would be known by now!  But I've tried so many different files and methods now I'm totally confused.
    Next step, seeing if I can edit it in Notepad, and how that afffects things, and also digging out a previous version of Dreamweaver and see what happens there.  Will let you know!

Maybe you are looking for