I can't seem to figure this out...

I posted this in another forum, but I have the weird feeling that it belongs here.
I'm trying to set up my web page gallery so that when you "click" on a cropped pic, it opens the full pic in it's own unresizable window that is exactly the same size as the pic...
Okay, now the problem. I have this already set up and working except that when the new window is opened with the pic in it, it has a margin on the left and top side. How do I get rid of this? Where do I put in the "top=0,left=0" or whatever?
Here's the java:
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function CaricaFoto(img){
foto1= new Image();
foto1.src=(img);
Controlla(img);
function Controlla(img){
if((foto1.width!=0)&&(foto1.height!=0)){
viewFoto(img);
else{
funzione="Controlla('"+img+"')";
intervallo=setTimeout(funzione,20);
function viewFoto(img){
largh=foto1.width;
altez=foto1.height;
stringa="width="+largh+",height="+altez;
finestra=window.open(img,"",stringa);
// -->
</script>
To get an idea of what I mean, check out my gallery...
http://home.cogeco.ca/~rnicholls2/gallery.htm

Well, you've posted in the wrong forum a second time :P These forums are for Java, not JavaScript, which are two completely different things. Not sure who can help you out here.

Similar Messages

  • Trying to renew my subscription and can't seem to figure this out, my plan doesn't need renewed until feb 2015 so its not giving me the option to manage my account. Creative cloud isn't giving taking the $ off my credit card why? The $ is on my credit car

    trying to renew my subscription and can't seem to figure this out, my plan doesn't need renewed until feb 2015 so its not giving me the option to manage my account. Creative cloud isn't giving taking the $ off my credit card why? The $ is on my credit card. Thank you.

    Log out of your Cloud account... Restart your computer... Log in to your Cloud account
    or
    Verify Account https://forums.adobe.com/thread/1465499 may help
    -Credit card https://helpx.adobe.com/utilities/credit-card.html

  • How can I have the first letter after a sentence ending period automatically capitalize?  Can't seem to figure it out...thanks!

    How can I have the first letter after a sentence ending period automatically capitalize?  Can't seem to figure it out...thanks!

    You need to fix capitalization in Pages Preferences > Auto-Correction. When you select this option, you can just keep typing in lower case and the first letter of the next sentence will automatically promote to upper case.

  • So i have an apple ipod touch 1st generation and it is not charging! It shows the charging sign but its taking a really long time to charge. Ive had it charging for at least 3 hours and it still says under 20% so can someone help me figure this out??

    So i have an apple ipod touch 1st generation and it is not charging! It shows the charging sign but its taking a really long time to charge. Ive had it charging for at least 3 hours and it still says under 20% so can someone help me figure this out??

    Not Charge
    - See:      
    iPod touch: Hardware troubleshooting
    iPhone and iPod touch: Charging the battery
    - Try another cable.
    - Try another charging source
    - Inspect the dock connector on the iPod for bent or missing contacts, foreign material, corroded contacts, broken, missing or cracked plastic.
    - Make an appointment at the Genius Bar of an Apple store.
      Apple Retail Store - Genius Bar 

  • I'm having issues loading Youtube on my MacBook Pro for about a week now.  I'm not sure if this is because of my computer or internet but my sister's PC loads Youtube completely fine.  Can someone help me figure this out?

    I'm having issues loading Youtube on my MacBook Pro for about a week now.  I'm not sure if this is because of my computer or internet but my sister's PC loads Youtube completely fine.  Can someone help me figure this out?

    Hi, I had been having the same problem for over a week, but both my window's HP and my 2011 macbook pro barely could load youtube.  What kind of router you have?  I was using a belkin play router that was only 8 months old, switched to a new AirPort Extreme Base Station and now everything works perfect.

  • Having trouble figuring out how to save the original photo after I've cropped it - i.e. I want to create a headshot of my husband from a photo of the two of us, but I also want to keep the original. Seems very basic, but can't seem to figure it out. Any h

    Having trouble figuring out how to save the original photo after I've cropped it - i.e. I want to create a headshot of my husband from a photo of the two of us, but I also want to keep the original. Seems very basic, but can't seem to figure it out. Any help would be great!

    Use File >> Save As
    Choose a different file name so as not to overwrite the original and don't save any changes when closing the original.

  • Aline my slides to beats & fit selected slides to music track is always grey I've tried every thing can someone please help figure this out

    aline my slides to beats & fit selected slides to music track is always Gray i cant seem to figure it out its something simple i'm sure I've been trying to work it out for hours can some one help me activate these features

    Hello Michael,
    that seems to depend on the theme of your Slideshow.
    I found that all music adjustments are disabled, unless my Slideshow has the "Classic" theme, so if you really want to fit the slide duration to the music try to switch your presentation theme to "classic".
    Cheers
    Léonie
    P.S. that seems to be a bug - the manual does not mention any restrictions in the newer themes.

  • Every time I open iMovie, the program doesn't respond. The Wheel comes up and I have to force quit. Can anyone help me figure this out so I can work on projects? if it helps, I'm running OS 10.5.8

    Hi, My iMovie program stops responding upon opening.  I can't figure it out.  I haven't really used it in the past but I would like to start.  My Mac is one of those aluminum Macbooks that look like a macbook pro and were on the market for a little bit.  I'm running OS 10.5.8 and its on the most recent update for the operating system.  I don't know how to correct the glitch. Any help would be great! Thanks
    -E

    OK, you have iMovie 08, which is also known is iMovie Version 7.1.4. It has been a few years since i used this version, so this is based on memory.
    The only components you must have in the Library/QuickTime folder are the AppleIntermediateCodec.component and the AppleMPEG2Codec.component.
    All the others could potentially be causing problems. I would drag the DivX components, the Flip4Mac components, and the Google Camera components to the Desktop temporarily, so nothing is left in this folder except the two Apple components.
    Then restart your Mac and start iMovie. If it works, yay!
    If you still need these other components for some other app, you can probably get updated DivX components for free at Perian.org.
    You can get updated Flip4Mac components by running WMV Player and updating. It should prompt you to update automatically.
    I am not sure about the Google components, but if you are running something that needs them, it should prompt you to install the current versions.
    If none of that works, post back.

  • Why can't any one figure this out!!!

    I am going insane racking my brain.  I have posted this in MANY different forums, including all over the place in here, and not only does no one understand whats going wrong but they have NO idea how to fix it.
    THIS IS WHAT I DID. I didn't realize I was using a rare font to make the menu in my website. The link is ShoresHatesMe.com its for a comedian who employed me to create it. So I made each menu item a small image and hyperlinked it to the appropriate page.
    In my preview in browser it looks perfect. so I posted it, and its all messed up on every page!
    Here is what the preview looks like in dreamweaver. This is how its supposed to look. Notice that you can see the full background behind the images.
    That is what I am trying to get it to look like. But when I posted it, it came out looking like this.
    The backrgound stops at the first menu item.
    I can't figure out whats going wrong here. But i keep trying to fix it and I can't figure it out! And since no one else can either its killing me. Even professionals that are HIRED to figure out why these things happen couldn't figure it out. I tried calling customer support over and over and I got excuse after excuse. I even had some one tell me on dreamweaver customer support that I must not be seeing things right because thats how its supposed to post??
    I dont' know whats going on but if some one could PRETTY PLEASE HELP ME! That'd be rad.

    Thank you. As much as I love copy/pasting URL's and reading irrelevant details like who it's for and why you're designing it it's easier to access and see if it's actually a link with a preceeding http:// to enable it as a clickable link in the forum.
    http://www.shoreshatesme.com
    Fix your validation errors and then we'll talk. You have tags that are not properly formatted.
    body has bg image as http://www.shoreshatesme.com/img/body.gif but, as you can see, the image is sliced. Put the full-height image as your bg image in body.

  • Can anyone help me figure this out? i have recurring kernel panics on my macbook A1278 and nothing seems to help

    Machine-check capabilities (cpu 3) 0x0000000000000c07:
    family: 6 model: 42 stepping: 7 microcode: 26
    Intel(R) Core(TM) i5-2435M CPU @ 2.40GHz
    7 error-reporting banks
    threshold-based error status present
    extended corrected memory error handling present
    Machine-check status 0x0000000000000005:
    restart IP valid
    machine-check in progress
    MCA error-reporting registers:
    IA32_MC0_STATUS(0x401): 0x0000000000000000 invalid
    IA32_MC1_STATUS(0x405): 0x0980000000000000 invalid
    IA32_MC2_STATUS(0x409): 0x0000000000000000 invalid
    IA32_MC3_STATUS(0x40d): 0x0000000000000000 invalid
    IA32_MC4_STATUS(0x411): 0x0000000000000000 invalid
    IA32_MC5_STATUS(0x415): 0x0020000000000000 invalid
    IA32_MC6_STATUS(0x419): 0x0020000000000000 invalid
    panic(cpu 0 caller 0xffffff80002c4dd5): "Machine Check at 0xffffff800023cfc6, registers:\n" "CR0: 0x000000008001003b, CR2: 0x0000000113704000, CR3: 0x0000000000100000, CR4: 0x00000000000606e0\n" "RAX: 0x000000b0adfda20a, RBX: 0xffffff8000892620, RCX: 0xffffff8016ebbaf8, RDX: 0x00000000000000b0\n" "RSP: 0xffffff800010beb0, RBP: 0xffffff800010bed0, RSI: 0x0000000000000002, RDI: 0xffffff8000803000\n" "R8:  0xffffff800e271800, R9:  0x0000000000000000, R10: 0x8000000000100000, R11: 0xffffff80002dad00\n" "R12: 0x0000000000000000, R13: 0xffffff800023cf30, R14: 0x0000000000000000, R15: 0xffffff8000892638\n" "RFL: 0x0000000000000097, RIP: 0xffffff800023cfc6, CS:  0x0000000000000008, SS:  0x0000000000000010\n" "Error code: 0x0000000000000000\n"@/SourceCache/xnu/xnu-1699.32.7/osfmk/i386/trap_native.c:2 78
    Backtrace (CPU 0), Frame : Return Address
    0xffffff800081bd20 : 0xffffff8000220792
    0xffffff800081bda0 : 0xffffff80002c4dd5
    0xffffff800081bf00 : 0xffffff80002daf2f
    0xffffff800010bed0 : 0xffffff800023e7ee
    0xffffff800010bf20 : 0xffffff80002b3832
    0xffffff800010bf50 : 0xffffff80002c9ab9
    0xffffff800010bf80 : 0xffffff80002c48d0
    0xffffff800010bfd0 : 0xffffff80002da712
    0xffffff80f2a63e70 : 0xffffff800022d375
    0xffffff80f2a63eb0 : 0xffffff800022e060
    0xffffff80f2a63f10 : 0xffffff800022f413
    0xffffff80f2a63f70 : 0xffffff800063c0e8
    0xffffff80f2a63fb0 : 0xffffff8000820057
    BSD process name corresponding to current thread: kernel_task
    Mac OS version:
    11G63
    Kernel version:
    Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64
    Kernel UUID: FF3BB088-60A4-349C-92EA-CA649C698CE5
    System model name: MacBookPro8,1 (Mac-94245B3640C91C81)
    System uptime in nanoseconds: 758833727049
    last loaded kext at 755421063771: com.apple.filesystems.smbfs          1.7.2 (addr 0xffffff7f80795000, size 241664)
    last unloaded kext at 123341153357: com.apple.driver.AppleUSBUHCI          5.1.0 (addr 0xffffff7f80b25000, size 65536)
    loaded kexts:
    com.apple.filesystems.smbfs          1.7.2
    com.apple.filesystems.ntfs          3.10.1
    com.apple.driver.AppleHWSensor          1.9.5d0
    com.apple.filesystems.autofs          3.0
    com.apple.driver.AppleMikeyHIDDriver          122
    com.apple.driver.AudioAUUC          1.59
    com.apple.driver.AppleHDA          2.2.5a5
    com.apple.driver.AppleUpstreamUserClient          3.5.9
    com.apple.driver.AppleMikeyDriver          2.2.5a5
    com.apple.driver.AppleIntelHD3000Graphics          7.3.2
    com.apple.driver.AGPM          100.12.75
    com.apple.driver.SMCMotionSensor          3.0.2d6
    com.apple.driver.AppleSMCPDRC          5.0.0d8
    com.apple.iokit.IOUserEthernet          1.0.0d1
    com.apple.iokit.IOBluetoothSerialManager          4.0.8f17
    com.apple.Dont_Steal_Mac_OS_X          7.0.0
    com.apple.driver.AppleSMCLMU          2.0.1d2
    com.apple.driver.AudioIPCDriver          1.2.3
    com.apple.driver.ApplePolicyControl          3.1.33
    com.apple.driver.ACPI_SMC_PlatformPlugin          5.0.0d8
    com.apple.driver.AppleLPC          1.6.0
    com.apple.driver.AppleBacklight          170.2.2
    com.apple.driver.AppleMCCSControl          1.0.33
    com.apple.driver.BroadcomUSBBluetoothHCIController          4.0.8f17
    com.apple.driver.AppleUSBTCButtons          227.6
    com.apple.driver.AppleUSBTCKeyboard          227.6
    com.apple.driver.AppleIRController          312
    com.apple.AppleFSCompression.AppleFSCompressionTypeDataless          1.0.0d1
    com.apple.AppleFSCompression.AppleFSCompressionTypeZlib          1.0.0d1
    com.apple.BootCache          33
    com.apple.iokit.SCSITaskUserClient          3.2.1
    com.apple.driver.XsanFilter          404
    com.apple.iokit.IOAHCIBlockStorage          2.1.0
    com.apple.iokit.IOAHCISerialATAPI          2.0.3
    com.apple.driver.AppleUSBHub          5.1.0
    com.apple.driver.AppleSmartBatteryManager          161.0.0
    com.apple.driver.AirPort.Brcm4331          561.7.22
    com.apple.driver.AppleSDXC          1.2.2
    com.apple.iokit.AppleBCM5701Ethernet          3.2.4b8
    com.apple.driver.AppleEFINVRAM          1.6.1
    com.apple.driver.AppleAHCIPort          2.3.1
    com.apple.driver.AppleUSBEHCI          5.1.0
    com.apple.driver.AppleACPIButtons          1.5
    com.apple.driver.AppleFWOHCI          4.9.0
    com.apple.driver.AppleRTC          1.5
    com.apple.driver.AppleHPET          1.7
    com.apple.driver.AppleSMBIOS          1.9
    com.apple.driver.AppleACPIEC          1.5
    com.apple.driver.AppleAPIC          1.6
    com.apple.driver.AppleIntelCPUPowerManagementClient          195.0.0
    com.apple.nke.applicationfirewall          3.2.30
    com.apple.security.quarantine          1.4
    com.apple.security.TMSafetyNet          8
    com.apple.driver.AppleIntelCPUPowerManagement          195.0.0
    com.apple.kext.triggers          1.0
    com.apple.driver.DspFuncLib          2.2.5a5
    com.apple.driver.AppleHDAController          2.2.5a5
    com.apple.iokit.IOHDAFamily          2.2.5a5
    com.apple.iokit.IOSurface          80.0.2
    com.apple.iokit.IOSerialFamily          10.0.5
    com.apple.iokit.IOFireWireIP          2.2.5
    com.apple.iokit.IOAudioFamily          1.8.6fc18
    com.apple.kext.OSvKernDSPLib          1.3
    com.apple.driver.AppleSMC          3.1.3d10
    com.apple.driver.IOPlatformPluginLegacy          5.0.0d8
    com.apple.driver.AppleGraphicsControl          3.1.33
    com.apple.driver.AppleSMBusPCI          1.0.10d0
    com.apple.driver.IOPlatformPluginFamily          5.1.1d6
    com.apple.driver.AppleBacklightExpert          1.0.4
    com.apple.iokit.IONDRVSupport          2.3.4
    com.apple.driver.AppleSMBusController          1.0.10d0
    com.apple.driver.AppleIntelSNBGraphicsFB          7.3.2
    com.apple.iokit.IOGraphicsFamily          2.3.4
    com.apple.driver.AppleUSBBluetoothHCIController          4.0.8f17
    com.apple.iokit.IOBluetoothFamily          4.0.8f17
    com.apple.driver.AppleThunderboltDPInAdapter          1.8.5
    com.apple.driver.AppleThunderboltDPAdapterFamily          1.8.5
    com.apple.driver.AppleThunderboltPCIDownAdapter          1.2.5
    com.apple.iokit.IOSCSIBlockCommandsDevice          3.2.1
    com.apple.driver.AppleUSBMultitouch          230.5
    com.apple.iokit.IOUSBMassStorageClass          3.0.3
    com.apple.iokit.IOUSBHIDDriver          5.0.0
    com.apple.driver.AppleUSBMergeNub          5.1.0
    com.apple.driver.AppleUSBComposite          5.0.0
    com.apple.iokit.IOSCSIMultimediaCommandsDevice          3.2.1
    com.apple.iokit.IOBDStorageFamily          1.7
    com.apple.iokit.IODVDStorageFamily          1.7.1
    com.apple.iokit.IOCDStorageFamily          1.7.1
    com.apple.iokit.IOSCSIArchitectureModelFamily          3.2.1
    com.apple.driver.AppleThunderboltNHI          1.6.0
    com.apple.iokit.IOThunderboltFamily          2.0.3
    com.apple.iokit.IOUSBUserClient          5.0.0
    com.apple.iokit.IO80211Family          420.3
    com.apple.iokit.IOEthernetAVBController          1.0.1b1
    com.apple.iokit.IONetworkingFamily          2.1
    com.apple.iokit.IOAHCIFamily          2.0.8
    com.apple.iokit.IOUSBFamily          5.1.0
    com.apple.driver.AppleEFIRuntime          1.6.1
    com.apple.iokit.IOHIDFamily          1.7.1
    com.apple.iokit.IOFireWireFamily          4.4.8
    com.apple.iokit.IOSMBusFamily          1.1
    com.apple.security.sandbox          177.11
    com.apple.kext.AppleMatch          1.0.0d1
    com.apple.driver.DiskImages          331.7
    com.apple.iokit.IOStorageFamily          1.7.2
    com.apple.driver.AppleKeyStore          28.18
    com.apple.driver.AppleACPIPlatform          1.5
    com.apple.iokit.IOPCIFamily          2.7
    com.apple.iokit.IOACPIFamily          1.4

    That panic was not caused by third-party software. If the problem is recurrent, the possibilities are:
    A stale or corrupt kernel cache
    A damaged OS X installation
    A fault in a peripheral device, if any
    Corrupt non-volatile memory (NVRAM)
    An internal hardware fault (including incompatible memory)
    An obscure bug in OS X
    You may already have ruled out some of these.
    Rule out #1 by booting in safe mode and then rebooting as usual. Note: If FileVault is enabled, or if a firmware password is set, or if the boot volume is a software RAID, you can’t do this. Post for further instructions.
    You can rule out #2 and #3 by reinstalling the OS and testing with non-essential peripherals disconnected and aftermarket expansion cards removed, if applicable. Sometimes a clean reinstallation may solve a problem that isn't solved by reinstalling in place.
    Corrupt NVRAM, which rarely causes panics, can be ruled out by resetting it.
    If your model has user-replaceable memory, and you've upgraded the memory modules, reinstall the original memory and see whether there's any improvement. Be careful not to touch the gold contacts. Clean them with a mild solvent such as rubbing alcohol. Aftermarket memory must exactly match the technical specifications for your model.
    Apple Diagnostics or the Apple Hardware Test, though generally unreliable, will sometimes detect a fault. A negative test can't be depended on. Run the extended version of the test, if applicable.
    In the category of obscure bugs, reports suggest that FileVault may trigger kernel traps under some unknown conditions. Most, though not all, of these reports seem to involve booting from an aftermarket SSD. If those conditions apply to you, try deactivating FileVault.
    Connecting more than one display is another reported trigger for OS X bugs.
    If your system is not fully up to date, running Software Update might get you a bug fix.
    In rare cases, a malformed network packet from a defective router or other network device can cause panics. Such packets could also be sent deliberately by a skillful attacker. This possibility is something to consider if you run a public server that might be the target of such an attack.
    If none of the above applies, make a "Genius" appointment at an Apple Store to have the machine tested. You may have to leave it there for several days. There isn't much point in doing this unless you can reproduce the panic, or if you can't, it happens often enough that it's likely to be repeated at the store. Otherwise you may be told that nothing is wrong.
    Print the first page of the panic report and bring it with you.
    Back up all data on the internal drive(s) before you hand over your computer to anyone. If privacy is a concern, erase the data partition(s) with the option to write zeros* (do this only if you know how to restore, and you have at least  two independent backups.) Don’t erase the recovery partition, if present.
    Keeping your confidential data secure during hardware repair
    *An SSD doesn't need to be zeroed.

  • My iMovie is not working, it tells me there's a problem but does not know the problem, Can someone help me figure this out please?

    A couple of days ago, my I opened up my iMovie and it just goes into the blank screen. I am able to click on things like, "import" or "create" and it will take me into the next window, but when I choose an option, I receive a message that there is a problem, but they don't know what the problem is. It has been like this for the past couple of days. I have deleted and re-downloaded the app about 3 times and it still comes out the same. Please assist in any way possible!

    Try a soft-reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider if it appears), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.
    When it's rebooted you can force a backup via Settings > iCLoud

  • Can anyone help me figure this out??? (exchange/ca...

    Hi, thanks in advance to anyone who can explain this to me, I'll try and explain step by step:
    My local exchange has been upgraded to infinity. (Eastbourne)
    When I punch in my postcode (don't have a BT number as I'm with Sky at the moment) it says not available.
    I've run my postcode through a different cabinet checker here CABINET CHECK BN21 1HF - and it says "part of deployment" though this data is months old.
    When I run the checker with CABINET CHECK BN21 1EY it is on the same cabinet.
    I checked that postcode on the BT infinity checker and they are able to get infinity - but I'm not??
    Does this mean it's not coming to my flat? I'm in a block of flats but most of the other properties on the road are houses. The block of flats next door (BN21 1HJ) is also unable to get infinity.
    This is infuriating! 50m down the road can get it and my mate 150m up the road can but not me!!
    http://fttc-check.alc.im/results.php?postcode=BN21​1ey

    @Plainview
    I thought it was pretty clear but there you go, I'll try again:
    The rollout process leaves potential customers in the dark.
    BT retail talk to the public but can't talk to Openreach.
    Openreach have the information but don't talk to the pbulic.
    BT Retail and Openreach are owned by the same company, there is no reason information couldn't be shared between them.
    This is catch 22.
    My conspiracy theory (!) is that this is done on purpose as if BT retail were able to obtain the information from Openreach the call volume of people phoning up to ask when they will be activated would be enormous. Openreach would have to hire large amounts of people to answer the constant requests from BT retail.
    Thus it easier for BT retail to just blanket deny they can get the information.
    It's either deliberate or it's just poor communication between two related companies (which is not very encouraging considering the industry they're in).
    Lastly, this means that any potential customers who are awaiting BT infinity but may be out of contract on their current ADSL plan (like me) are stuck.
    You could wait for infiity and stick with your DSL at a price that may not the best deal available or,
    you could switch DSL provider for a better deal and wake up tomorrow with infinity available but you are now stuck in a contract for a year!
    All the while the information is known by Openreach (I don't mean they know day and date for certain but certainly have better information than we do) and we are being kept in the dark.

  • Can anyone help me figure this out?

    Hi everyone, I have a college question which i'm stuck on, being new to java im struggling to finish the program, I'm still trying to get the correct code for the program, im not yet at the stage where im ready to compile. Anyway here is the task:
    Write a program which represents a vehicle museum, which houses 2 types of vehicles: cars and motorbikes, these have the following in common: licence plate, year of manufacture, value, colour, the variables exclusive to cars are no of doors, no of seats, engine type(petrol/diesel), engine size (litres), the variables exclusive to bikes are: bike type(sports/tourer/trails) and engine size (cc).
    The task is to create a program that will:-
    add new vehicles (bikes or cars)
    list all vehicles manufactured in a given year
    list all vehicles of 1 litre or more (1 litre = 1000cc)
    list all bikes
    list all cars
    The first thing I did was to write the code for the classes which I think is OK, the vehicle class being the parent class, with the cars and bikes as subclasses.
    Then i've attempted to write methods for all the functions: addcar, addbike, the main menu and the methods for listing the vehicles in a given year and 1 litre or more.
    Where im getting a bit stuck is the fact there is 2 objects: cars and bikes, which im having trouble with. heres the code, i've put comments on it where i think im going wrong:
    /* The museum class */
    class Vehicles
         private String plate;
         private String colour;
         private int year;
         private int value;
         Vehicles(String p, String c, int y, int v)
              plate = p;
              colour = c;
              year = y;
              value = v;
         String getPlate()
              return plate;
         String getColour()
              return colour;
         int getYear()
              return year;
         int getValue()
              return value;
    /* The Car Class */
    class Car extends Vehicles
         private int nodoors;
         private int noseats;
         private String enginetype;
         private double enginesize;
         Car(String p, String c, int y, int v, int d, int s, String t, double e)
              super (p, c, y, v); // super class constructor
              nodoors = d;
         noseats = s;
         enginetype = t;
              enginesize = e;
         int getNodoors()
              return nodoors;
         int getNoseats()
              return noseats;
         String getEnginetype()
              return enginetype;
         double getEnginesize()
              return enginesize;
    /* The Bike Class */
    class Bike extends Vehicles
         private String biketype;
         private int enginesize;
         Bike(String p, String c, int y, int v, int z, String b)
              super(p, c, y, v); // super class constructor
              biketype = b;
              enginesize = z;
         String getBiketype()
              return biketype;
         int getEnginesize()
              return enginesize;
    class Museum
         static final int quit = 0;
              public static int getMenuOpt() //menu method, i think this bit is ok?
                   Scanner menuOpt = new Scanner(System.in);
                   int option;
                   System.out.println("1. Add a bike to the collection");
                   System.out.println("2. Add a car to the collection");
                   System.out.println("3. List all manufactured in a given year");
                   System.out.println("4. List all vehicles over 1 litre (1000cc)");
                   System.out.println("5. List all cars");
                   System.out.println("6. List all bikes");
                   System.out.println(quit + ". Quit");
                   option = menuOpt.nextInt();
                   return option;
         public static int addBike(Bike bikes[], int bikeTot) //method to add bike not sure about this, do I need to declare all variables or just the ones exclusive to bikes
              Scanner input = new Scanner(System.in);
              String type;
              int esize;
              System.out.print("Enter registration number ");
              plate = input.nextLine();
              System.out.print("Enter colour ");
              colour = input.nextLine();
              System.out.print("Enter year of manufacture ");
              year = input.nextInt();
              System.out.print("Enter the value of the vehicle ");
              value = input.nextInt();
              System.out.print("Enter the type of bike (Sports, Tourer or Trails ");
              type = input.nextLine();
              System.out.print("Enter the size of the engine (in cc)");
              esize = input.nextInt();
              bikes[bikeTot] = new Bike(plate, colour, year, value, type, esize);
              bikeTot++;
              return bikeTot;
         public static int addCar(Car cars[], int carTot) // again not sure about this same question applies as the addbike method
              Scanner input = new Scanner(System.in);
              int doors;
              int seats;
              String type;
              double esize;
              Scanner input = new Scanner(System.in);
              System.out.print("Enter registration number ");
              plate = input.nextLine();
              System.out.print("Enter colour ");
              colour = input.nextLine();
              System.out.print("Enter year of manufacture ");
              year = input.nextInt();
              System.out.print("Enter the value of the vehicle ");
              value = input.nextInt();
              System.out.print("Enter the number of doors ");
              doors = input.nextIntLine();
              System.out.print("Enter the number of seats ");
              seats = input.nextIntLine();
              System.out.print("Enter the engine type (P for Petrol, D for Diesel) ");
              type = input.nextLine();
              System.out.print("Enter the size of the engine (in litres)");
              esize = input.nextDouble();
              cars[carTot] = new Car(plate, colour, year, value, doors, seats, type, esize);
              carTot++;
              return carTot;
         public static void ListByYear(Bike bks[], int bikeTot, Car cars[], int carTot)
              Scanner input = new Scanner(System.in); // Really not sure about the code for this method, dont know how to list vehicles for both cars & bikes
              int year;
              System.out.print("Enter Year ");
              year = input.nextInt();
              for (int count = 0; count < carTot; count++)
                   if ( Car[count].getYear() == year )
                        System.out.println( Car[count].getPlate() );
         public static void listEngineSize(Bike bks[], int bikeTot, Car cars[], int carTot)
              Scanner input = new Scanner(System.in);
              int enginesize;
              System.out.print("Enter Engine Size (in cc) "); // Again struggling on this one, the cars engine size will be in litres, the bikes in cc,
    // This is probably all wrong!
              enginesize = input.nextInt;
              for (int count = 0; count < count++)
              if
              ( Bike[count].getEnginesize > enginesize );
              System.out.println( Bike[count].getPlate);
              ( Car[count].getEnginesize > enginesize );
    System.out.println( Car[count].getPlate);
         public static void main(String[] args)
    // The main method, i think this bit is ok, please let me know if it isnt
              Car cars[] = new Car[100];
              Bike bikes[] = new Bike[100];
              int carsInMuseum = 0;
              int bikesInMuseum = 0;
              int option;
              option = getMenuOpt();
              while (option != quit)
                   if (option == 1)
                        bikesInMuseum = addBike(bike);
                   else if (option == 2)
                        carsInMuseum = addCar(car);
                   else if (option == 3)
                        ListByYear(car, bike);
                   else if (option == 4)
                        listEngineSize(car, bike);
                   else if (option == 5)
                        listallcars(car);
                   else if (option == 6)
                        listallbikes(bike);
                   else System.out.println("Invalid input - please try again");
                   option = getMenuOPt();
    }

    I've simplified my program for the time being, you just can add a car or bike (up to 100 of each) then print a list of cars or bikes stored, what i want to know is there any way of simplifying the listallcars and listallbikes methods to just one line of code to print a list of all the attributes for the car class & also bike class, im not sure how this is done.
    Here is my code, this time it compiles with no errors & runs ok
    Sorry if the answer is obvious im really new to all this.
    import java.util.Scanner;
    /* The Vehicle Class*/
    class Vehicles
         private String plate;
         private String colour;
         private int year;
         private int value;
         Vehicles(String p, String c, int y, int v)
              plate = p;
              colour = c;
              year = y;
              value = v;
         String getPlate()
              return plate;
         String getColour()
              return colour;
         int getYear()
              return year;
         int getValue()
              return value;
    /* The Car Class */
    class Car extends Vehicles
         private int nodoors;
         private int noseats;
         private String enginetype;
         private double enginesize;
         Car(String p, String c, int y, int v, int d, int s, String t, double e)
              super (p, c, y, v); // super class constructor
              nodoors = d;
             noseats = s;
             enginetype = t;
              enginesize = e;
         int getNodoors()
              return nodoors;
         int getNoseats()
              return noseats;
         String getEnginetype()
              return enginetype;
         double getEnginesize()
              return enginesize;
    /* The Bike Class */
    class Bike extends Vehicles
         private String biketype;
         private int enginesize;
         Bike(String p, String c, int y, int v, String b, int z)
              super(p, c, y, v); // super class constructor
              biketype = b;
              enginesize = z;
         String getBiketype()
              return biketype;
         int getEnginesize()
              return enginesize;
    class museum
         static final int quit = 0;
         public static int getmenuopt()
              Scanner menuopt = new Scanner(System.in);
              int option;
              System.out.println("1. Add a bike to collection");
              System.out.println("2. Add a car to collection");
              System.out.println("3. List all cars");
              System.out.println("4. List all bikes");
              System.out.println(quit + ". Quit");
              option = menuopt.nextInt();
              return option;
         public static int addBike(Bike bikes[], int bikeTot)
              Scanner input = new Scanner(System.in);
              String plate;
              String colour;
              int year;
              int value;
              String type;
              int esize;
              System.out.print("Enter registration number: ");
              plate = input.nextLine();
              System.out.print("Enter colour: ");
              colour = input.nextLine();
              System.out.print("Enter year of manufacture: ");
              year = input.nextInt();
              System.out.print("Enter the value of the vehicle: ");
              value = input.nextInt();
              System.out.print("Enter the type of bike (Sports, Tourer or Trails: ");
              type = input.next();
              System.out.print("Enter the size of the engine (in cc): ");
              esize = input.nextInt();
              bikes[bikeTot] = new Bike(plate, colour, year, value, type, esize);
              bikeTot++;
              return bikeTot;
         public static int addCar(Car cars[], int carTot)
              Scanner input = new Scanner(System.in);
              String plate;
              String colour;
              int year;
              int value;
              int nodoors;
              int noseats;
              String type;
              double esize;
              System.out.print("Enter registration number: ");
              plate = input.nextLine();
              System.out.print("Enter colour: ");
              colour = input.nextLine();
              System.out.print("Enter year of manufacture: ");
              year = input.nextInt();
              System.out.print("Enter the value of the vehicle: ");
              value = input.nextInt();
              System.out.print("Enter the number of doors: ");
              nodoors = input.nextInt();
              System.out.print("Enter the number of Seats: ");
              noseats = input.nextInt();
              System.out.print("Enter the engine type: ");
              type = input.next();
              System.out.print("Enter the engine size: ");
              esize = input.nextDouble();
              cars[carTot] = new Car(plate, colour, year, value, nodoors, noseats, type, esize);
              carTot++;
              return carTot;
    /*  list all bikes, can this be simplified to print out all attributes of bike class without having to type all this code */
         public static void listallbikes(Bike bikes[], int bikeTot)
              for (int count = 0; count < bikeTot; count++)
                   System.out.println("Bike no: " + (count+1) + "  reg no " + (bikes[count].getPlate()));
                   System.out.println("Year: " + (bikes[count].getYear()));
                   System.out.println("Colour: " + (bikes[count].getColour()));
                   System.out.println("Value: " + (bikes[count].getValue()));
                   System.out.println("Type of bike: " + (bikes[count].getBiketype()));
                   System.out.println("Engine Size: (cc) " + (bikes[count].getEnginesize()));
                   System.out.println();
    /*  list all cars, can this be simplified to print out all attributes of bike class without having to type all this code */
         public static void listallcars(Car cars[], int carTot)
              for (int count = 0; count < carTot; count++)
                   System.out.println("Car no: " + (count+1) + "  reg no " + (cars[count].getPlate()));
                   System.out.println("Year: " + (cars[count].getYear()));
                   System.out.println("Colour: " + (cars[count].getColour()));
                   System.out.println("Value: " + (cars[count].getValue()));
                   System.out.println("No of doors: " + (cars[count].getNodoors()));
                   System.out.println("No of seats: " + (cars[count].getNoseats()));
                   System.out.println("Engine type: " + (cars[count].getEnginetype()));
                   System.out.println("Engine size (l): " + (cars[count].getEnginesize()));
                   System.out.println();
         public static void main(String[] args)
              Bike bikes[] = new Bike[100];
              Car cars[] = new Car[100];
              int bikesinmuseum = 0;
              int carsinmuseum = 0;
              int option;
              option = getmenuopt();
              while (option != quit)
                   if (option == 1)
                        bikesinmuseum = addBike(bikes, bikesinmuseum);
                   else if (option == 2)
                        carsinmuseum = addCar(cars, carsinmuseum);
                   else if (option == 3)
                        listallcars(cars, carsinmuseum);
                   else if (option == 4)
                        listallbikes(bikes, bikesinmuseum);
                   else System.out.println("Invalid input - try again");
                   option = getmenuopt();
         

  • HT1695 i just got an ipad 2, 32gb, i have  wireless internet thru my phone carrier for my computer, they say i can use up to 5 devices with it, but i cant get the ipad to connect to it, i have tried everything, i think, can u help me figure this out

    i just recieved an ipad2, 32gb, i cant figure out how to get it to connect to my wireless internet.. it is thru my cell carrier, i am suppose to be able to use up to 5 devices with it at the same time.. can someone tell me what i am missing.

    You can not install it.
    Only apps from the official Apple App Store can be installed.

  • Erased os x and its recovery partition to install ubuntu (elementary). want os x back, can't seem to figure it out. anyone know?

    had an install disc of earlier os x release, but ubuntu didn't want to recognize it. would only show an harddrive image labeled "windows" which led back to elementary os.

    If this on a Mac from late 2011 or newer you can use the Online Internet Recovery system to repartition the drive as one partition formatted in the OS X Mac format and reinstall the original shipping version of OS X. To boot from the Online system at startup hold down the Command + Option/Alt + r keys and keep them held down until you see a globe on the screen. From that you use Disk Utility to do the repartitioning and formatting.
    If older than a late 2011 model and if you Mac came with System reinstall discs you need to boot from the OS X reinstall discs and then do the repartitioning.
    To boot from the original reinstall disc at startup hold down the c key to boot directly from the OS X install disc or the Option/Alt key to get a boot selection screen and then select the OS X reinstall disc.

Maybe you are looking for

  • I Have A New Lacie Rugged 320 GB - Do I Partition The Drive?

    I have a new Lacie Rugged 320GB (along with my other two Lacie external hard drives), and have a few questions about setting this one up for what I want to do. 1. I want make a partition to save a complete eMac Hard Drive on the new Lacie Rugged 320

  • Send Filename from j2se FILE Adapter

    Hi, I need store filename from local file to xml element. When I use j2ee adapter there is no problem. I sended Filename to Adapter Metadata and through DynamicConfigurationKey in mapping I write it to element. My question is: How could i do it in j2

  • How Do Decrypt .rem Files on Mac OSX10.6.8

    hi, i have an old bb curve 8900 with over 1000 pics and i am trying to download the pics, but every time i try they all have the .rem extension. ive tried transferring them to my mac using the bb desktop manager but it is only reading 168 pics and ig

  • SDK update 1.0 Bugs

              There is a problem with the SimpeChat component.  The button is split into 2, and if you click on the bottom button, smiley faces keep on being typed continuously.

  • New TDS requirement SAP note 1486147

    Hello, This is regarding the new TDS requirement for which SAP note 1486147 has to be implemented. The problem is that we have implemented the note and also maintained entries in J_1I_SECCO_CIT as well as the entries in J_1IEWT_ACKN. When we do the t