Changing images on html

Hellow to everybody, i would like to know witch is the html
code or script
that let me change images on and web page any time i refres
it.
I would like to make a page with 4 images at the top, that
change
any time that one user refresh it.
Thanks to anyone who can help me.
David

Google "banner rotation".
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
==================
"informatic-tec" <[email protected]> wrote in
message
news:efj729$mpa$[email protected]..
> Hellow to everybody, i would like to know witch is the
html code or script
> that let me change images on and web page any time i
refres it.
>
> I would like to make a page with 4 images at the top,
that change
> any time that one user refresh it.
>
> Thanks to anyone who can help me.
>
> David
>
>
>

Similar Messages

  • Re: [iPlanet-JATO] Tomcat 3.2 serving images and html?

    First of all David you are faster responding to email than I am. Thanks.
    We tried your scheme with no luck. You are using "ROOT" as your war file
    name ROOT, correct? Are you sure the jsp would reference
    "/images/MyProject/nppnback.gif"? Why is "MyProject" in there? Where is
    the directory "images" defined to Tomcat? Is it a default?
    Here's another try at explaining:
    In my JSP I have;
    <IMG SRC="/images/ef.gif" ALT=People Banner">
    My application is in webapps/EformsAppWar
    (jsps in EformsAppWar/EformsApp/eforms/*.jsp)
    (classes in EformsAppWar/WEB-INF/classes)
    so images are in webapps/EformsAppWar/images
    and there is, indeed a ef.gif there.
    However with no server.xml changes (everything default), Tomcat 3.2
    gives a 404 in his log and states in the 404 message that context is
    null (CTX < >) and ca't find /images/ef.gif + NULL.
    By the way I just noticed that in Tomcat 3.1 I have the images directory
    directly under webapps.
    ----- Original Message -----
    From: "David J.L. Martin" <<a href="/group/SunONE-JATO/post?protectID=114166018056146134184102046176231239071179066034">dave@t...</a>>
    Date: Wednesday, May 23, 2001 3:35 pm
    Subject: Re: [iPlanet-JATO] Tomcat 3.2 serving images and html?
    This works:
    If the doc root is webapps\ROOT --
    Using defaults...jsp's would be put in
    webapps\ROOT\MyProjectApp\MyProject\*.jsp
    and images would be put in webapps\ROOT\images\*.gif
    Then in your jsp...use the following reference:
    "/images/MyProject/nppnback.gif">
    That will work just using defaults and not playing with any of the
    config files...
    ie. webapps\ROOT\WEB-INF gets updated as well (with required
    classes).
    djm
    TechPie
    916 924-1832 (office)
    916 730-4743 (mobile)
    916 313-3531 (fax)
    <a href="/group/SunONE-JATO/post?protectID=114232044112042209130232046248130100239179057215113109152006048067">dmushrush@e...</a> wrote:
    Many of you are running Tomcat 3.2. Can anyone tell me how to get
    images to be served by Tomcat. In 3.1 if I referenced /images/image.gif> in my JSP, I could just place the images
    directory in the application
    (context) directory.
    The default docBase is webapp> that webapp> relative addressed as /images/image.gif but such is not the case.
    I have put the images directory almost everyplace possible with no luck.
    I have explicitly defined docBase in tomcat/conf/server.xml and still no
    luck.
    I currently have the following in conf/server.xml
    <Context path="/EformsAppWar"
    docBase="c:/tomcat/webapps/EformsAppWar"
    crossContext="true"
    debug="0"
    reloadable="true" >
    </Context>
    I place images in that directory structure but still take 404's and in
    the log it refers to context as /images ????
    I'm probably doing something (or not doing something) foolish. Anybody> have a remedy.
    <a href="/group/SunONE-JATO/post?protectID=210083235237078198050118178206047166215146166214017110250006230056039126077176105140127082088124241215002153">[email protected]</a>
    <a href="/group/SunONE-JATO/post?protectID=210083235237078198050118178206047166215146166214017110250006230056039126077176105140127082088124241215002153">[email protected]</a>

    First of all David you are faster responding to email than I am. Thanks.
    We tried your scheme with no luck. You are using "ROOT" as your war file
    name ROOT, correct? Are you sure the jsp would reference
    "/images/MyProject/nppnback.gif"? Why is "MyProject" in there? Where is
    the directory "images" defined to Tomcat? Is it a default?
    Here's another try at explaining:
    In my JSP I have;
    <IMG SRC="/images/ef.gif" ALT=People Banner">
    My application is in webapps/EformsAppWar
    (jsps in EformsAppWar/EformsApp/eforms/*.jsp)
    (classes in EformsAppWar/WEB-INF/classes)
    so images are in webapps/EformsAppWar/images
    and there is, indeed a ef.gif there.
    However with no server.xml changes (everything default), Tomcat 3.2
    gives a 404 in his log and states in the 404 message that context is
    null (CTX < >) and ca't find /images/ef.gif + NULL.
    By the way I just noticed that in Tomcat 3.1 I have the images directory
    directly under webapps.
    ----- Original Message -----
    From: "David J.L. Martin" <<a href="/group/SunONE-JATO/post?protectID=114166018056146134184102046176231239071179066034">dave@t...</a>>
    Date: Wednesday, May 23, 2001 3:35 pm
    Subject: Re: [iPlanet-JATO] Tomcat 3.2 serving images and html?
    This works:
    If the doc root is webapps\ROOT --
    Using defaults...jsp's would be put in
    webapps\ROOT\MyProjectApp\MyProject\*.jsp
    and images would be put in webapps\ROOT\images\*.gif
    Then in your jsp...use the following reference:
    "/images/MyProject/nppnback.gif">
    That will work just using defaults and not playing with any of the
    config files...
    ie. webapps\ROOT\WEB-INF gets updated as well (with required
    classes).
    djm
    TechPie
    916 924-1832 (office)
    916 730-4743 (mobile)
    916 313-3531 (fax)
    <a href="/group/SunONE-JATO/post?protectID=114232044112042209130232046248130100239179057215113109152006048067">dmushrush@e...</a> wrote:
    Many of you are running Tomcat 3.2. Can anyone tell me how to get
    images to be served by Tomcat. In 3.1 if I referenced /images/image.gif> in my JSP, I could just place the images
    directory in the application
    (context) directory.
    The default docBase is webapp> that webapp> relative addressed as /images/image.gif but such is not the case.
    I have put the images directory almost everyplace possible with no luck.
    I have explicitly defined docBase in tomcat/conf/server.xml and still no
    luck.
    I currently have the following in conf/server.xml
    <Context path="/EformsAppWar"
    docBase="c:/tomcat/webapps/EformsAppWar"
    crossContext="true"
    debug="0"
    reloadable="true" >
    </Context>
    I place images in that directory structure but still take 404's and in
    the log it refers to context as /images ????
    I'm probably doing something (or not doing something) foolish. Anybody> have a remedy.
    <a href="/group/SunONE-JATO/post?protectID=210083235237078198050118178206047166215146166214017110250006230056039126077176105140127082088124241215002153">[email protected]</a>
    <a href="/group/SunONE-JATO/post?protectID=210083235237078198050118178206047166215146166214017110250006230056039126077176105140127082088124241215002153">[email protected]</a>

  • Changing image file name

    I'm working with dreamweaver 8 for Mac.
    Imagine that you have a html page with more than 200 images, that you have changed many times during the last few years, some have been deleted others have been added. And some are not linked any more.
    At the beginning the pictures were numbered from the top of the page to the bottom of the page in order (picture1, picture2....), now they are messed up (picture13, picture 1....).
    If I rename the images in my local file folder, DW update it on the html page. Unfortunately in the local file folder the pictures are not displayed, I have to open all of them (200 images) on my desktop ! I The result: a big mess. So my question is:
    Is it possible to make a file name change on the html page, and DW update it on the local files folder?
    I hope I've been clear. Thanks for your help.

    What I would do is create a PHP script that places the images in a document, sorted on date.
    If you Google the subject, you will see many examples on how to do this. One such search gave me this http://www.javascriptkit.com/javatutors/externalphp2.shtml
    If you then see an image that you no longer need, you can remove it from the directory. This will leave you with the images that you do need sorted from earliest date to the latest  date.
    Keep this script for the document that you want to show the images on. Future maintenance will consist of removing the unwanted images from the directory and adding new ones. The PHP page will automatically be updated. No worries with file names, as long as you do not have two the same.
    Although I mention PHP, the same goes for all serverside scripts.
    Good luck.
    Gramps

  • Change the default HTML template when saving for web

    Hi,
    Is there a way to change the default HTML output template when you go to "Save for web" and select "HTML & Images"? I would like to modify the default HTML <head> tag.
    Thanks.

    Two observations.
    First — "Tools-> ...." is specific to Acrobat X and XI. It did not exist prior to Acrobat X.
    Second — Acrobat 9 Pro / Standard (nor earlier release) does not support viewing a PDF page containing a scanned image and performing a right-click  ... Save Image As. 
    The context menu provided by Acrobat 9 Pro with a right-click on a scanned image is:
    The context menu,from a right-click with the TouchUp Object tool selected, for Acrobat 9 Pro is:
    So, to paraphrase what Paul Harvey used to say ... What's the rest of the story?
    Be well...

  • Changing images on jsp

    I created a jsp page with a button and a image (ImageComponent). When the button is pressed a picture is retrieved from a database and saved on the CLIENTs harddrive (ex: "C:\\img.jpg"). After this the image should be changed to the picture just downloaded from the database.
    The tried to call the methode:
    image.setUrl("C:\\img.jpg");
    then the current image dissapears, but the new image isn't displayed.
    Did I used the right methode, or should I just call some kind of refresh methode? Can you please help.
    THANX

    Google "banner rotation".
    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
    ==================
    "informatic-tec" <[email protected]> wrote in
    message
    news:efj729$mpa$[email protected]..
    > Hellow to everybody, i would like to know witch is the
    html code or script
    > that let me change images on and web page any time i
    refres it.
    >
    > I would like to make a page with 4 images at the top,
    that change
    > any time that one user refresh it.
    >
    > Thanks to anyone who can help me.
    >
    > David
    >
    >
    >

  • Single photo slideshow /changing image?

    Okay, so here's what I'm trying to figure out:
    On the welcome page of my website I have one large photograph. I'd like this photograph to change roughly every 3 seconds to a new photograph, and cycle through about 6 photographs in total. It's not exactly a slideshow that I'm after, more of a changing image. I also don't want any buttons or text around it, I just want my changing photograph...
    How do I do this?
    Thanks in advance!

    see my instruction in this thread on how to build slideshow using iweb photos page:
    https://discussions.apple.com/message/13175645#13175645
    example and code had been moved here:
    http://iweb3widgets.cyclosaurus.com/AutoSlideshow/AutoSlideshow.html
    http://iweb3widgets.cyclosaurus.com/AutoSlideshow/Code.html

  • How to change images based on action.Even clicking changed images should ?

    how to change images based on action.
    Even clicking changed images should do respective actions.
    and while displaying only one image at a time sholud get displayed.
    I am using three images for a single column of a table in Jsp.
    Any clues.
    Any link for any good javascript html jsp site where i can find some good solution.
    vijendra

    In broad way if i say i have multiple situations in mutiple tables where i need such a logic to operate in for all tables.
    lets say in first time load of page by default one image will be displayed (one with sorted order for first column rest all non sorted)Now after every click to any image respective sort should get called.along with all images should get changed.Here with every function one/two images will get effect at least.
    As in first if i say sort by desc then this image will change rest all will remain in unsort form.
    when i move to other column and click on new image the previos will convert to unsort and new one will convert to sort by ascending. rest all will be in unsort form as it is.
    Now it seems like same logic is required with two three conditions.
    even for everyaction different parametrs has to be passed at differnt situations.
    Any good idea if someone can suggest.
    I will be very greatful for him.
    thanks
    vijendra

  • Why can't I drag an image or html file into a browser window with Firefox 17

    to get a quick view of various images or html files, I like simply dragging the files from my local drive into a Firefox browser window.
    since upgrading to FF 17, I can no longer do that. a NO symbol comes up when attempting this. and Dreamweaver will no longer preview with Firefox, even though it's my designated, preferred browser.
    anybody know if both of these are some setting or something?

    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do not click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Cannot display remote images in HTML messages

    Hi all.
    This has been a problem since Tiger for me and ironically, is affecting me on two macs (although I sync the two together, so whatever the problem is, I'm guessing it's been copied to both locations). Here's the deal:
    I cannot display images in my messages. If I click the checkbox (under viewing in mail prefs) "display remote images in HTML messages" I get the same behavior as if it is unchecked. I've tried checking and unchecking to no avail. My guess is a corrupted preference file, but I don't know which one. If I delete my mail prefs, will I need to do anything with regards to my mailboxes etc? I have over 3GB of offline mail, all filed away into hundreds of folders and do NOT want to mess with that.
    Any suggestions are most appreciated. I'd love to see my images again without clicking on the "load images" button for EVERY email.
    Thanks,
    Rob

    I can't believe there's no answer for this at Apple Support! (I looked.) On my MacBook with Leopard (10.5.6 and Mail 3.5) the problem is fairly recent - I only noticed it a few days ago. Unchecking and rechecking the Display remote images in HTML messages does not work, and neither does restarting the computer (I rarely do, preferring to put it to sleep.) Before I removed the plist I thought I'd check here first, having the same reasons for reluctance as xrob - and a good thing I did, too. I'd hate to have the same (bad) experience as someone who already tried it. The only thing I can think that I changed recently was to add SSL support to (all) my accounts. Could that be the culprit? I guess not. I removed "use SSL" on one of the accounts but it changed nothing, except for the port number. I closed and re-opened Mail but did not restart the computer. And, where do you find the "load images" button?

  • Error in exporting REPORT image or HTML

    I have been receiving an error recently while trying to export a REPORT into an image format or HTML.  I receive this error:
    "Cannot open clipboard.  (Error code 0)"
    Has anyone received this error before?  I have been able to export images and HTML files before, and I am not sure what I have done to change my system.
    Thank you,
    Julia

    Hi,
    I think I found the problem.  I have been experiencing clipboard problems lately with Microsoft Office products.  It appeared as though my clipboard would stop working after I would do a lot of copying and pasting.  Rebooting my computer fixed the problem.  After searching for help, it seems that my problem involves connecting remotely to a Windows 2003 server, which I do often.  If the connection is open, copying and pasting sometimes does not work on my computer.  It appears I am having a similar problem with DIAdem.  If I am remotely connected to a server, I cannot export images.  When I disconnect, everything works.  I thought that was a really strange problem, but maybe if anyone else has the problem, this might help.
    Julia

  • Loading local images into HTML component

    I need to intermix text and images for a project I'm working
    on, and using htmlText seems the best way to do it. However, I
    can't get it to work when the images are loaded from the local file
    system.
    It seems to work fine with remote images:
    <mx:HTML x="480" y="191" width="256" height="315">
    <mx:htmlText>
    <![CDATA[
    <p>Image: <img src='
    http://knight.fb.hive7.com/res/img/ico/x32/coin.gif'
    ></p>
    ]]>
    </mx:htmlText>
    </mx:HTML>
    But not with local images:
    <mx:HTML x="480" y="191" width="256" height="315">
    <mx:htmlText>
    <![CDATA[
    <p>Image: <img src='../assets/coin.gif'
    ></p>
    ]]>
    </mx:htmlText>
    </mx:HTML>
    Anybody have any ideas or workarounds?

    Hi,
    I tried your solution, it did not worked, it gave me following error -
    ==========
    ReferenceError: Error #1056: Cannot create property placeLoadStringContentInApplicationSandbox on mx.core.FlexHTMLLoader.
        at com.exa.view::TestView/changeEvt()[/home/sachin/workspace/newed/src/com/exa/view/TestView .mxml:70]
        at com.exa.view::TestView/__toctree_change()[/home/sachin/workspace/newed/src/com/exa/view/T estView.mxml:89]
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.3.0\frameworks\projects\framework\src \mx\core\UIComponent.as:9308]
        at mx.controls.listClasses::ListBase/mouseUpHandler()[C:\autobuild\3.3.0\frameworks\projects \framework\src\mx\controls\listClasses\ListBase.as:8989]
        at mx.controls::List/mouseUpHandler()[C:\autobuild\3.3.0\frameworks\projects\framework\src\m x\controls\List.as:2279]
        at mx.controls::Tree/mouseUpHandler()[C:\autobuild\3.3.0\frameworks\projects\framework\src\m x\controls\Tree.as:2952]
    ===========
    Here is the code, the function gets called on change event of a tree component(not shown in code here)
    ===============
    <mx:Panel width= "70%" height="100%" id="cpanel" paddingBottom="10" paddingLeft="20" paddingTop ="20">
            <mx:HTML id="htmlc" width="100%" height = "100%">
            </mx:HTML>
        </mx:Panel>
    <mx:Script>
        <![CDATA[
              public function changeEvt(event:Event):void{
                   htmlc.htmlLoader.placeLoadStringContentInApplicationSandbox = true;
                   htmlc.htmlLoader.loadString(rh.content.replace(/src="\/images/mg,'src="assets'));
        ]]>
    </mx:Script>
    ================
    It would be helpful if you give more insight on your html component.
    Adobe air -version - 1.5
    Thanks

  • In Mail 3.6 remote images in HTML messages display as blue squares with ? even though checked in viewing references.

    In Mail 3.6 remote images in HTML messages display as blue squares with ? even though checked in viewing references.

    Nurit,
    The point is that that button should not be there, if the preference setting is as you say. This indicates the preference setting is stuck, and that is what I was trying to help you resolve.
    The full purge is done as follows:
    Quit Mail, and in the Finder open Home/Library and locate the Mail folder. Control-click over the Mail folder, and choose Duplicate -- then drag the resulting copy to the Desktop for temporary backup. Next, open Home/Library/Preferences and find the com.apple.mail.plist file and drag it to the desktop.
    Relaunch Mail, which will open as though new, and when prompted to import anything DECLINE. Instead, re-enter your account info, and Mail will re-discover the account folders for your accounts, and all should be well, after setting preferences as you desire.
    Ask any needed questions, and keep us posted.
    Ernie

  • Display image in html mail

    I was recently sent an email that used an HTML stationery wih several photos embedded in it.  The email opens normally, but all of the images are icons, displaying file name and size.  If I click the icon, the image opens correcly in a separate window. 
    I am running OS X 10.7.3 and Mail 5.2 (1257) and have checked "display remote images in html email" in preferences.  A friend with identical software versions receives the same email and the photos are visible in the original email. Suggestions?

    No-one replied, but I found a solution on another board. Run Terminal (do a Spotlight search if you don't know where to find this), and type: (or copy and past the next line)
    defaults write com.apple.mail DisableInlineAttachmentViewing -bool false
    This will force Mail not to disable inline attachment viewing. Obviously, to reverse this, simple replace 'false' at the end with 'true'.
    Thanks to Louise101 from July 2011 for posting this.

  • Report template auto-changed to Default: HTML

    I use the builtin report template "Default: Look 4" for all of my report screens and have a problem when importing the application with a new Application ID.
    All reports that use the "Default: Look 4" template get changed to "Default HTML" in the new application and I have to manually change them all back again. This is a real pain because I use the application ID as a form of version control - the old versions of the application are auto-forwarded to the new one - so I end up having to do the change quite often.
    Is there a way I can prevent the template from changing?

    If it's any help to you, I did a bit of 'vanilla' testing ...
    - create a new workspace TEST
    - Edit Page 1 of the Sample Application
    - Note that the region "My Top Orders" is using layout "template: 12. Standard, Alternating Row Colors"
    - export the Sample Application
    - import the Sample App with Auto-Assign New App ID selected
    - Edit Page 1 in the new application and note that the region template for "My Top Orders" is still set to "template: 12. Standard, Alternating Row Colors"
    - Change the template for "My Top Orders" to "default: Look 4"
    - Export application
    - Import application with auto-assigned AppID
    - Edit "My Top Orders" and note that template is changed to "default: HTML (standard)"
    The template is only changed when the exported application uses one of the "default: Look X" templates, other templates are not changed. Also, importing into the same or different application makes no difference, the template is still changed.
    Thanks for your quick reply so far Scott!

  • Changing Images at Runtime...it's sending me nuts (I'm a newbie, go easy)

    Hi all,
    I am trying change images at runtime and quite frankly it's driving me nuts. I'm pretty new to Java and don't understand some of the principles but I'm trying. I have this code below, that loads up a few images. I want to be able to change some/all of these images either on a timed even or on a button press, but all the things I've tried don't work. Can someone offer me some help....thanks in advance
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class bc extends JFrame implements ActionListener {
         public static void main(String[] args) {new bc();}
         bc() {
              //setUndecorated(true); // - this removed the titlebar!
                    setTitle("BC...");
              setSize(350,125);
              setResizable(false);
              setLocation(50,50);
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              setBackground(new Color(0,0,0));
              getContentPane().setBackground(new Color(255,255,255));
              JPanel hours = new JPanel();
              hours.setLayout(new GridLayout(4,2));
              hours.add(hour14);
              hours.add(hour24);
              hours.add(hour13);
              hours.add(hour23);
              hours.add(hour12);
              hours.add(hour22);
              hours.add(hour11);
              hours.add(hour21);
              JPanel mins = new JPanel();
              mins.setLayout(new GridLayout(4,2));
              mins.add(min14);
              mins.add(min24);
              mins.add(min13);
              mins.add(min23);
              mins.add(min12);
              mins.add(min22);
              mins.add(min11);
              mins.add(min21);
              JPanel secs = new JPanel();
              secs.setLayout(new GridLayout(4,2));
              secs.add(sec14);
              secs.add(sec24);
              secs.add(sec13);
              secs.add(sec23);
              secs.add(sec12);
              secs.add(sec22);
              secs.add(sec11);
              secs.add(sec21);
              JPanel helptext = new JPanel();
              helptext.setLayout(new GridLayout(4,2));
              helptext.add(new JLabel("8"));
              helptext.add(new JLabel("4"));
              helptext.add(new JLabel("2"));
              helptext.add(new JLabel("1"));
    //add action listenters
              changeImg.addActionListener(this);
              JPanel cp = new JPanel();
              cp.setLayout(new GridLayout(1,6));
              cp.setBackground(new Color(255,255,255));
              cp.add(hours);
              cp.add(mins);
              cp.add(secs);
              cp.add(helptext);
              cp.add(changeImg);
              setContentPane(cp);
              setVisible(true);
         public void actionPerformed(ActionEvent ae) {
              hour11.PaintOff(1);
              //JOptionPane.showMessageDialog(this, "changed");
              repaint();
    JPanel hour11 = new PaintOff(0);
    JPanel hour12 = new PaintOff(0);
    JPanel hour13 = new PaintBlank();
    JPanel hour14 = new PaintBlank();
    JPanel hour21 = new PaintOff(0);
    JPanel hour22 = new PaintOff(0);
    JPanel hour23 = new PaintBlank();
    JPanel hour24 = new PaintBlank();
    JPanel min11 = new PaintOff(0);
    JPanel min12 = new PaintOff(0);
    JPanel min13 = new PaintOff(0);
    JPanel min14 = new PaintOff(0);
    JPanel min21 = new PaintOff(0);
    JPanel min22 = new PaintOff(0);
    JPanel min23 = new PaintOff(0);
    JPanel min24 = new PaintOff(0);
    JPanel sec11 = new PaintOff(0);
    JPanel sec12 = new PaintOff(0);
    JPanel sec13 = new PaintOff(0);
    JPanel sec14 = new PaintOff(0);
    JPanel sec21 = new PaintOff(0);
    JPanel sec22 = new PaintOff(0);
    JPanel sec23 = new PaintOff(0);
    JPanel sec24 = new PaintOff(0);
    JButton changeImg = new JButton("change");
    }///---------This is my PaintOff class ---------------\\\
    import javax.swing.*;
    import java.awt.*;
    import java.awt.Image.*;
    public class PaintOff extends JPanel {
    Toolkit tk = Toolkit.getDefaultToolkit();
    public Image imgOff = tk.getImage("off.jpg");
    public Image imgOn = tk.getImage("on.jpg");
    public Image paintMe = tk.getImage("off.jpg");
         PaintOff(int a) {
              if(a == 1) {
                   vOn();
              } else {
                   vOff();
         public void vOn() {
            paintMe = imgOn;
         //JOptionPane.showMessageDialog(new bc(), "shown");
         public void vOff() {
            paintMe = imgOff;
         public void paintComponent(Graphics g) {
              g.drawImage(paintMe,0,0,this);
    }PaintBlank class is not included here, it's basically just the same as PaintOff but only has one image inside.
    When I try and compile this code, I get
    C:\jdk1.4\bin\bclock>javac bc.java
    bc.java:79: cannot resolve symbol
    symbol : method PaintOff (int)
    location: class javax.swing.JPanel
    hour11.PaintOff(1);
    ^
    1 error
    I don't understand this either, I've tried replacing "PaintOff(1)" with "vOn()" but I get the same error. This is baffling to be, as I thought that the hour11 would have access to all the methods inside the PaintOff class?
    Anyway, thanks for any help you guys give me!
    Cheers
    //Chris.

    Hi!
    Your problem is that you've used a widening conversion to convert from PaintOff to a JPanel. JPanel has no such method, and so the compiler is complaining that it can't find it.
    e.g
    public class NoCompile{
         public static void main(String args[]){
              One one = new Two();
              one.methTwo();
    public class Two extends One{
         public Two(){}
         public void methTwo(){
            System.out.println("Executed 2");
    public class One{
         public One(){}
         public void meth1(){}
    } will give you the same sort of error message. To make the compiler happy, use a cast.
    Now this will compile and gives the right result.
    public class NoCompile{
         public static void main(String args[]){
              One one = new Two();
              ((Two)one).methTwo();
    }So in your case, you want to do
    ((PaintOff)hour11).vOn();
    Does that help?
    :) jen

Maybe you are looking for

  • Web Item - Table

    Hi all, Can anyone tell me how I can increase the cell padding ie the cell size and also the font size inside the cell for table web item.  There is no property to achieve this, we can change the static html code but that doesn't solve my problem.  D

  • HT201270 my phone is os 4.2 iphone 3G can i upgrade to 4.3 or later? thanks

    my phone is os 4.2 iphone 3G can i upgrade to 4.3 or later? thanks

  • Why does my 4g and 3gs i phone get my message when its not group message?

    why does my 4g and 3gs i phone get my messages,same household but not group message same apple itune account thou.

  • Bcp export question

    I need to bcp export 3 large tables from our prod sql server.  How does bcp manage transactions on the source server when bulk exporting?  Does it hold one long running transaction?  Is this controllable? scott

  • Windows won't show up on start up

    Hi, I finally managed to get boot camp working and save an Windows .ios file to my samsung 3.0 Hardrive however when I press alt on the start up only the macintosh HD and the recovery disk shows up. I dont think it's a problem with the ios file itsel