Images still not printing

In my program, 5 images should be printed, but it only prints one image , the last image I create. I am not sure why this happens, please help.
import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;
import java.io.*;
import javax.imageio.*;
import javax.swing.*;
* This class demonstrates how to load an Image from an external file
public class Image1 extends JComponent {
public Image1(String x, String y, int p) {
try {
    img[p] = ImageIO.read(new File(x + y + ".gif"));
} catch (IOException e) {
    e.printStackTrace();
BufferedImage[] img = new BufferedImage[6];
int z;
public void paintComponent(Graphics g) {
     for(int i = 1; i < 6;i++){
     g.drawImage(img, 0, 0, null);
g.drawImage(img[2], 100, 0, null);
g.drawImage(img[3], 200, 0, null);
g.drawImage(img[4], 300, 0, null);
g.drawImage(img[5], 400, 0, null);
public Dimension getPreferredSize() {
if (img[1] == null) {
return new Dimension(100,100);
} else {
return new Dimension(img[1].getWidth(null), img[1].getHeight(null));
public static void main(String[] args) {
JFrame f = new JFrame("Load Image Sample");
f.addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent e) {
System.exit(0);
          Card crd = new Card();
          crd.makeBlank();
          for (int i = 1; i<=5; i++){
          crd.makeCards();
          String y = crd.getSuitAsletter();
          String x = crd.getValueAsnumber();
          System.out.println(crd.getValueAsnumber()+ "," + crd.getSuitAsletter() );
          f.add(new Image1(x, y, i));
f.pack();
f.setVisible(true);

So why did you start a new posting? You already have a posting on this topic:
http://forum.java.sun.com/thread.jspa?threadID=5143911
People don't know what has already been suggested if you keep starting new discussions.

Similar Messages

  • New HP ink cartridges - still not printing black

    New HP inks - but still not printing black. Have re-inserted; cleaned printhead; store replaced ink cartridge incase faulty; ink levels all full. No black printing; just good old faint grey. I am so frustrated with this printer and dont really want to have to schlepp it to the repairs place when it was working perfectly before I replaced the ink. Have had to pay the shop for 2 black inks as clearly the first wasnt faulty - it's the printer. Have even tied the APP suggestion but still grey where it should be black! Reluctant to take out printhead and wash it under tap. Should i try that?!!

    Hi @rhare 
    No, personally I suggest calling us instead. Some printers have printheads that are intended to be removed and cleaned if necessary, your printers printhead is fixed and is not intended to be removed.
    If you are in Canada or US call 800 474 6836, or you can Contact HP Worldwide.
    I hope this helps.
    Please click the Thumbs up icon below to thank me for responding.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Sunshyn2005 - I work on behalf of HP

  • Some images do not print when in printed documentation

    I have been encountering this problem for over a year now...
    I maintain over 20 projects in RoboHelp HTML. I have numerous
    printed document layouts defined. However, in what appears to be
    random situations, some of my images do not print. They display
    online just fine, but they are not visible in the printed
    documentation. Only a blank gap displays where the image should
    display. And there is no conditional build tag applied to any of
    these images. The reason I think it is random is because, if I
    perform the following test, the images print just fine:
    - duplicate the printed documentation layout
    - remove, from the duplicate copy, all of the pages
    surrounding a page that contains an image that does not print
    - generate the duplicate copy

    I had a similar problem with missing images. I never really
    solved it, but it (apparently) went away. One thing which helped
    was ensuring that none of my images had filenames containing
    spaces.
    In addition, selecting Link images rather than Embed can be
    useful; missing images are then replaced by a red cross which makes
    it easier to locate the problem.
    Also, in Word, you should uncheck Tools > Options >
    Print > Update Fields (that is for Word 2003).
    --- Derek

  • Black not printing - did all recommended steps, still not printing

    I tried all the steps recommended in other posts. Still not printing black. If I replace the printhead, will that solve the problem?

    Hello @MN8  and @WHMaggie,
    Welcome to the HP Support Forums!
    I understand that you are both experiencing quality issues when printing in black ink from your HP Officejet 6500 All-in-One Printers. I would like to offer some additional assistance with resolving this issue.
    Can I please have you both click here to access the troubleshooting steps. Once the support document opens please check Steps 1-5 to ensure that no steps have been missed. If you have completed those 5 steps to no avail, please proceed with Step 7 and Step 8 to manually clean and soak the Printhead mechanism.
    Should the issue persist after cleaning the Printhead manually than the next step would be to replace the Printhead. The Printhead is the part that the cartridges fit into. It controls 'reading' the cartridges and putting ink on the page. If you're experiencing cartridge detection or quality issues and a replacement cartridge fails to resolve the issue than the next step would be to replace the Printhead mechanism. There is always a chance that the print system within the actual Officejet is defective. Should that be the case than a replacement Printhead will not resolve the issue and a whole unit replacement would be needed. If your printers are Out of Warranty I would recommend contacting our Technical Support queue by phone to explore replacement Printhead and printer options.
    HP Technical Support can be reached at: 800-474-6836.
    If you live outside the US/Canada Region, please click the link below to get the support number for your region.
    HP Worldwide Contact
    I wish you both luck going forward with this issue. Have a nice day!
    X-23
    I work on behalf of HP
    Please click "Accept as Solution" if you feel my post solved your issue, it will help others find the solution.
    Click the "Kudos, Thumbs Up" on the right to say "Thanks" for helping!

  • Image is not printing in PrintAdvanceDataGrid when the PrintAdvanceDataGrid was added to Vbox

    I tried to print the image in the PrintAdvance Data Grid  , image is not priniting  when the PrintAdvanceDataGrid was added to Vbox or Vgroup, can any one help?

    Images are loaded asynchronously, so they appear after the page is sent to the printer.  Using an image cache should help.
    -Alex

  • Duplex printing Changed to mode D, still not printing

    Hi Experts,
    Though it is common question, after searching the posts, i could not get proper answer. Hence asking for the help.
    I have the requirement of printing on both sides.
    i have 2 pages -> page 1 and page 2
    For both the pages, i changed to output options - print mode - D (for duplelx).
    Changed the SPAD transaction printer attributes to Duplex too.
    But still could not able to print.
    Can you please help me on this issue.
    Thanks & Regards,
    Sakthi Sri.
    Moderator message: not directly related to ABAP development, please have a look in the Netweaver forum.
    Edited by: Thomas Zloch on Dec 23, 2010 10:58 AM

    We've called Verizon at least 7 times and asked them to correct this problem.  Everyone has a different answer.  Today, they said we needed to take the batteries out of all of our landline phones to "clear the memory" and that would fix it.  Still not fixed.  I don't think anybody at Verizon knows how to change the caller ID banner !

  • Images Still Not Loading

    Hi,
    Please could someone tell me how to make the images sent via e-mail appear in the message on my iPhone.
    I have turned on and off the "Load Remote Images" button in Settings. Images are still not loading, all I get is a square where the picture should be and a blue box with a "?" in the middle. Should I delete mail account first, reboot the iPhone, etc.
    In an idiot proof fashion could someone please tell me how to get this to work, i.e.
    1. Delete the mail account.
    2. Turn off or on, Load Remote Images.
    3. Add Mail Account.
    Thank you in anticipation of resolving this issue.
    Eternally grateful
    Geoff

    My solution to this issue is that I had to turn OFF remote images. Turn off my iPhone completely, turn my iPhone back on then turn remote images back ON again. And all seems to be well now

  • Image size not printing correctly on paper

    I am creating a simple flyer on my mac using MS PowerPoint. I know not the ideal software to use for this, but its a very simple flyer and I know how to use that software the best. My problem is every time I try to print it, the size printed gets all out of whack or edges are cut off.
    For example, in my software, my document size is 8.5 x 11" and in the print dialog I am also choosing 8.5 x 11 paper. I know that my printer will NOT print anything closer to .19" from all edges of the paper (I guess would be called the printer margin), so in my document I am sure not to place anything within those print margins. When I try to print it, in the preview of the print dialog (and if printed) the top and left edges are lined up correctly/with the correct margin, but the right and bottom of the page are largely cut off. And I don't mean that the "image is too big for the page" kind of cut off, because its not. I mean that the top and left margin are the correct .19" but the right and bottom are around 1.5" or so cutting off the image there.
    Here are things I have tried to correct this problem:
    I have checked every margin setting possible and they are all correct/normal.
    Checking the "Scale to fit" option in the print dialog shrinks my entire image where nothing is cut off, but then all margins are too big for my intended appearance.
    I have opened the same PowerPoint document on a PC in my network and printed, and everything printed correctly.
    I saved the PowerPoint document as a JPEG, opened it in Preview and on screen it looks fine, but when I open the print dialog from within there, I get the same problems; right and bottom cut off, and scale to fit's margins are too big.
    Any suggestions on maybe something I missed, how to correct this problem, or why I am getting this problem?

    You should make sure that your printer is selected in Page Setup, rather than the generic Any Printer. You may need to look for it in Options... when you choose it in PowerPoint.

  • Placed eps images do not print

    Our company prints large format graphics, an we like to use PS eps files as the file size is much reduced. However, the images fequently will not print until the file is closed and re-opened again, no matter what we are printing to, or even if a PDF is saved from the file, vector data is output, but not the eps images. This is putting a serious strain on our Graphics dept. as the files must now be revisited, and steps repeated. Any ideas?

    Darth,
    Am I understanding correctly that you are linking to Photoshop .eps files in Illustrator, and when printing or making pdfs the images dispear without any warning. If you go back in later and print the files without doing and changes, the images print.
    Try:
    linking to images directly on the hard drive, so you know if this is a server issue.
    What are you .eps settings, are you using Encoding with compression. We used that in the 90s, but .eps with jpeg compresion and cmyk caused problems liek you described adn errored out RIPs so stopped. You may want to look into the .pdf file format instead. the .psd format has non lossy compresison which works nice, btiu since you are doing large scale you are probably ok with a small level of lossy compression whci gives you a big file size savings. If you are able to drag and drop files to print them large format, you may also save time by saving copies of .ai files to .pdf and doing that.

  • Sony Handycam - file conversion to DV but images still not clear ?

    I am a new user to iMac have had read some great ideas through this discussion page. The first issue I have encountered is using my Sony Handycam (DCR-SR62) with the MAC ! Following advice, I have downloaded Streamclip + Quicktime MPEG-2 and have managed to convert image to 'DV' file and then import this to iMovie. My problem now is that the video footage is still not all that clear - any other suggestions would be great !

    thanks for the help.
    +2. You mean you have an old cable (that used to work) AND a new cable? And neither seems to work?+
    I actually had 2 firewire cables, one old one, one not so old, neither will work with the camera, so I bought a brand new one, which also doesn't work.
    I know the firewire port in my mac is fine - I use it constantly, and I've also tried the camera on 2 other Mac's so I know it's not that.
    I tried plugging the camera into my Macs with the USB connection but Image Capture can't detect it. But I also tried plugging it into a Windows PC laptop today - it recognised that something was connected (although didn't have the software to operate it) so I presume it can still connect via the USB.
    I guess that the firewire out port on the camera itself is the most likely problem (I can't have 3 broken firewire cables!!). One of the pins in the port on the camera may have been damaged somehow when plugging or unplugging the cable. Hopefully I'll be able to download the video on a PC using a USB connection, but I don't know yet! And I don't know how easy it would be to fix the port on the camera... presuming that is the problem... and it's not just been 'disabled' by a setting somewhere somehow...

  • Epson R800, 8.17 Drivers and 10.6.2 still not printing properly

    Hi,
    I am also having problems even with the new 8.17 drivers.
    I have been doing some testing and there are definite differences between how Leopard and Snow Leopard prints.
    I have printed the TC9.18RGB iSis(A4) test chart (for building output profiles with Gretag Macbeth's ProfileMaker 5.0.8).
    If I print this chart in 10.5.8 with 3.0.9 drivers from PS CS4 with no colour management selected in PS and with colour management disabled in the printer driver, the charts print as I would expect them to, with clear, distinct steps. I have seen this chart printed so many times, I just know how it should look.
    However, if I print the same chart in 10.6.2 with colour management switched off in PS and 8.17 driver, the same chart looks dark, almost like they are only representing the 3/4 tones to shadow end.
    I went ahead and built my profiles anyway from the odd-looking Snow Leopard charts, with the captured target data from the less-than-ideal charts and the shadow-end of the profile is screwed, getting a very greenish cast.
    The one thing I have noticed is that in the 10.6.2 / 8.17 driver if you select No Colour Adjustment and click on the Advanced Colour Settings, it shows you the ColorSync Profile based upon your paper type - so I wonder if there is still some colour managing going on, which obviously you don't want when printing test charts.
    Anyone else have any ideas?
    Cheers,
    Matthew

    Matthew, I dont' have an answer for your problem but wonder if you can help me with mine. I also have an R800 but since installing SL cannot get it to work correctly.
    Initially I could print from it but had no printer settings.
    When the new driver was issued by Epson a few days ago I thought my problem was solved. Downloaded driver and attempted to install but ran into a peculiar problem. As you know the install starts, downloads several files and then gives you the option to quit or continue. Not knowing which files have been downloaded I selected continue. However, this scenario continues ad infinitum and the only way I can quit the program is to do a force quit. I mean like I can literally sit for any time period you want to name and the install continue as if it's in a loop.
    I have since deleted all epson files contained in library and in sys.pref.
    Second attempt to install resulted in what appeared to be a normal setup including printer settings but now the printer will not print. Message reads error:/library/printer/epson
    I feel that there must be some epson files left behind from the first install attempt but I don't seem to find them.
    I've contacted epson and the only reply I got from them was 'download driver and install'.
    After that lengthy explanation I have two questions.
    First one, when installing the downloaded file should I quit the setup when the first query to continue or quit occurs, if not when?
    Second question, where else would you look to be sure all the epson files are deleted before attempting a second install.
    Really appreciate any help.
    Dylan

  • I have a hp deskjet 2050 all-in-one j510 series printer wired it and ran cd still not printing what

    i have rechecked wires not sure what i did printer will not print please help

    Hi, Yesterday I bought the above printer and installed it on my Windows XP but when I click for the printer to print there is an error messsage that comed up bizsupport2.austinhp.. I have no idea what this means all I know is my printer is not printing
    Can someone please give me any help
    Thanks

  • Brand new ink cartridges, cleaned, still not printing

    Recurring problem on this printer, nothing helps.  Brand new ink cartridges, cleaned the inkheads twice, read though solutions for de-clogging the vents.  Able to print documents fine this morning, now---nothing.  Black ink not printing.  Frustrating, this is a recurring problem and am tired of going through more ink.  Ran alignment, just says "alignment failed" but no solutions offered/no troubleshooting given.  Suggestions?

    Hi @OL5,
    Welcome to the HP Forums!
    I see that your HP Photosmart is not printing black. I am sorry to hear this, but happy to help!
    For further assistance, I will need to know:
    The Product/Model Number of your printer. Follow instructions in this link. Finding Your HP Product Model Number.
    If the printer is connected, Wireless, or USB.
    If the power cable is plugged into a surge protector, or directly to the wall outlet. Issues when Connected to an Uninterruptible Power Supply/Power Strip/Surge Protector. This applies to Inkjet printers as well. 
    If you are using genuine HP ink cartridges, or refills.
    Once I know this information, I will be happy to do some further research for you.
    Thank you for posting!
    RnRMusicMan
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" to say “Thanks” for helping!

  • Align=right tag causes image to not print

    I inserted an image at the beginning of a paragraph. Then, I
    manually added the align=right parameter to the <img src>
    tag. However, now my image won't print when I generate my printed
    documentation layout.

    See Word Issues in this topic.
    http://www.grainge.org/pages/authoring/printing/print_issues.htm

  • HP Deskjet 3070A Replaced the cartridges and still not printing

    My printer says i need to use the Set UP cartridges that came with my printer that is impossible as my printer is 20 months old. I had no problems with any kind of printing e-print etc. until now I had to replace my cartridges. I purchased HP364 and i have tried and cleaned my printer but it well not print. Sometimes it tells me Magenta is in compatible 2 days later it say Cyan was incompatible.  Please can you help
    This question was solved.
    View Solution.

    @DJBell 
    I'm going to reply to the private msg you sent me on this.
    Ciara
    Although I am an HP employee, I am speaking for myself and not for HP.
    Twitter: @Ciara_B_HP

Maybe you are looking for

  • Is this a bug in __env_close_pp?

    I'm using Berkeley DB 4.6.21. in __env_close_pp, this function calls __repmgr_close, then __env_close, and __env_close calls __rep_env_close. __repmgr_close will join any replication threads(selector, messengers, and elect_thread). But __rep_env_clos

  • Re: How to enable NTLM authentication in OSB???

    Hi all, We have the same problem trying to integrate OSB with and asmx service that uses NTLM. We try an alternative, we have created the artifacts of asmx service using wsimport and we created a little java project using these artifacts. We also add

  • How do i contol mac mini with my i pad

    I use my year old mack mini to run multiple professional music programs and other simple programs like pandora and itunes.  I would like to use my ipad like it is a touchscreen monitor for the mini from across my private wifi or bluetooth in my studi

  • DriverManagerConnectionPoolConnection not closed with TopLink cahce synch

    We're using TopLink in several JVMs and have configured cache synchronisation over JMS. The JMS topic runs on Oracle AQ. Every once in a while we get the follwoing error from OC4J: DriverManagerConnectionPoolConnection not closed, check your code! No

  • OSB Java Callout, no methods shown when selecting jar

    Hi, I'm trying to invoke a Java method in OSB. I've already done this before with a simple static method. What this time is diffrent is that now my jar contains dependency to another jar, like Xerces. After I've imported my jar, and I'm trying to sel