Create an Image from a Component

Can anybody tell me how to create an Image from a Component?
I intend to create an Image from a JTable now but I want to have a more generic solution of course to be able to create an Image from any Java / Swing component (Applet, JList, JButton, ...).
Thank you,
Dirk

2 ways:
1) java.awt.Toolkit.createScreenCapture(Rectangle bounds)
2) This:
     public static BufferedImage grabByPaint(Component comp) {
          boolean visible = comp.isVisible();
          // if not visible, need to make visible to make sure sizes are correct. 
          if(!visible) {
               comp.setVisible(true);
          Dimension size = comp.getSize();
          BufferedImage bi = new BufferedImage(size.width, size.height, BufferedImage.TYPE_INT_ARGB);
          Graphics2D g2d = bi.createGraphics();
          comp.paintAll(g2d);
          if(!visible) {
               comp.setVisible(false);
          g2d.dispose();
          return bi;
     }

Similar Messages

  • Create an image from Component

    I have created an ImageLoader that stores images loaded from the filesystem. I do however need a default image that is not reliant on loading an image from the filesystem, in case any images on the filesystem are not found.
    I have tried to use Components createImage() method, until I read that this can only be used if the Component is visible on screen, which my Component never will be.
    What I really want is a grey rectangle as an ImageIcon by what means I get this I'm not bothered,
    hopefully someone can help

    Use the java.awt.image.BufferedImage class. To create a BufferedImage object, no component need to be visible. Here is some sample code:       BufferedImage image = new BufferedImage(wid, ht, BufferedImage.TYPE_INT_RGB);
           Graphics2D gc = image.createGraphics();
           gc.drawRect(x,y, width, height);Note that BufferedImage is a subclass of Image. So, you can create ImageIcon from a BufferedImage object.
    If you don't want to use BufferedImage, an option would be to create the image from an array of bytes.

  • Creating an image from a Mac and restoring it in another Mac

    Hi,
    I've spent a couple of hours trying to make a copy of one of my macminis, trying to copy it in another macmini to have the SAME machine "duplicated".
    I've read some tutorials online, but something is going wrong....
    First of all, I went to my "master" macmini, DiskUtility, create new image from folder, select my macintosh HD and I created the image of the whole HD.
    Almost a hour after, the image was created.
    Then I moved the .dmg to a USB drive, and I connected the USB pen to the machine that I want to be a "clone" of the master. There, I opened Disk Utility, Restore, I selected the Source image from my USB, but I can't selected (=drag) the Macintosh HD into the "destination" field...
    What I'm doing wrong?
    Thanks, any help is appreciated :))

    Hi sr.richie;
    If you are booted from Macintosh HD then the system will not allow this cloning operation to take place. You must boot from another disk in order to do that.
    Allan

  • How to create an image from another one with midp1.0 as in midp 2.0

    hi:
    we can create an image from part of another one in midp2.0 width the following method
    createImage(Image image, int x,int y,int width,int height,int transform)
    but have to work with midp1.0, then how?
    regards

    but i have six icons in one picture, (tow row ,three column, each size 14*14)
    it's ok to get the top-left icon with the following code
    Image image = Image.createImage("/myicon.png");
    Image tmp = Image.createImage(14, 14);
    Graphics g = tmp.getGraphics();
    g.drawImage(image, 0, 0, Graphics.TOP|Graphics.LEFT);
    but how to get other icon?
    regards

  • Creating an image of a component

    hi
    i'm working on a small applet. i need to create an image of any component (like JLabel) before it is shown on the screen.
    can i do it?

    Try:
    Image getComponentImage(Component comp) {
        BufferedImage imgBuf = new BufferedImage(comp.getWidth(),comp.getHeight(), BufferedImage.TYPE_INT_ARGB_PRE);
        Graphics gr = imgBuf.createGraphics();
        comp.paint(gr);
        return imgBuf;
    }Graeme

  • [SOLVED] How to Create an Image from UTF8 Text via Command-line

    As the title points out, I'm trying to create an image from unicode text via command line. I tried...
    convert -pointsize 48 -size 400 caption:测试用 text.png
    But that results in question marks for the Chinese characters. So searching around online I discovered that I needed to specify a font which could display the characters. The characters show up just fine in Firefox, KDE, Kate, Terminal, etc so I know I have a font which can render them. I thought it might be DejaVu but this also resulted in question marks...
    convert -font /usr/share/fonts/TTF/DejaVuSerif.ttf -pointsize 48 -size 400 caption:测试用 text.png
    Any ideas?
    Last edited by tony5429 (2011-01-31 23:17:41)

    DejaVu doesn't contain those Chinese glyphs at all, so please don't blame ImageMagick for not rendering them.
    So, Firefox, Kate, Terminal and the others you stated to use DejaVu, if encounter these characters, fall back to some other fonts to render them. These fonts are, however, not vector, but bitmap fonts. (This can be seen if you increase text size (Ctrl++ in Firefox): the Chinese characters don't change, they remain of their inherent size.)
    Actually, e.g. /usr/share/fonts/misc/18x18ko.pcf.gz definitely contains the three example characters, so the mentioned apps may use this font as fall back.
    Apparently ImageMagick doesn't handle bitmap fonts (I'm not sure), so you won't be able to hit your original target. Anyway, since you tried to parse "-pointsize 48", you wouldn't be satisfied with the font size.
    Your only choice seems to be using the above mentioned CJK-approved TTFs.
    EDIT: typo
    Last edited by barto (2011-01-28 21:52:33)

  • Create still images from video files?

    from http://gadgetwise.blogs.nytimes.com/2009/04/16/5-new-photoshop-tips-for-photographers/ , "You can now preview video in Bridge and create still images from video files."
    I just installed the 5.4 Camera Raw Update.
    I can preview the AVI files from my Nikon D5000, but have not figured out how I might create a still image ( other than stopping the movie, and dragging to copy ) Have tried searching adobe, this forum, have not found more info ion this.

    Stop the video at the desired point, press the Shift, Command, and 4 keys, drag the cursor so that the whole picture is highlighted, let go of the button, and open the PNG on the desktop.
    (35300)

  • Create transparency image from shape

    Hi,
    I'd like to create the application that create the transparency image from drawing data. the code is as follows.
    BufferedImage img = new BufferedImage(350,350,BufferedImage.TYPE_INT_RGB);
    Graphics2D g2 = img.createGraphics();
    GeneralPath gp = new GeneralPath(GeneralPath.WIND_NON_ZERO);
    gp.moveTo(100,100);     gp.lineTo(100,200);
    gp.lineTo(200,200);     gp.lineTo(200,100); gp.closePath();
    g2.setPaint(Color.yellow);
    g2.fill(gp);
    g2.setStroke(new BasicStroke(2));
    g2.setPaint(Color.red);
    g2.draw(gp);
    File outFile = new File("outimg.png");
    ImageIO.write(img,"png",outFile);
    I can create the image from such code, but the image is not transparent since the background is all black. What additional coding I need to make it transparent?
    Thanks,
    Sanphet

    1. use a PixelGrabber to convert the image into a pixel array
    2. (assuming pixel array called pixelArray) :
    if (pixelArray[loopCounter] == 0xFFFFFFFF) { //assuming the black your seeing is not a fully transparent surface
        pixelArray[loopCounter] = pixelArray[loopCounter] & 0x00FFFFFF; //sets alpha channel for all black area to 0, thus making it fully transparent
    }3. recreate an Image using MemoryImageSource
    I'm sure there is a quicker solution using some built in java functions...but hey, I dont' know it!! :)
    Here's a sample class that utilizes these techniques:
    * To start the process, click on the window
    * Restriction (next version upgrade) :
    *     - firstImage must be larger
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.*;
    import javax.swing.*;
    public class AdditiveBlendingTest extends javax.swing.JFrame implements MouseListener, ActionListener, WindowListener {
        static final int ALPHA = 0xFF000000; // alpha mask
        static final int MASK7Bit = 0xFEFEFF; // mask for additive/subtractive shading
        static final int ZERO_ALPHA = 0x00FFFFFF; //zero's alpha channel, i.e. fully transparent
        private Image firstImage, secondImage, finalImage; //2 loades image + painted blended image
        private int firstImageWidth, firstImageHeight, secondImageWidth, secondImageHeight;
        private int xInsets, yInsets; //insets of JFrame
        //cliping area of drawing, and size of JFrame
        private int clipX = 400;
        private int clipY = 400;
        //arrays representing 2 loades image + painted blended image
        private int[] firstImageArray;
        private int [] secondImageArray;
        private int [] finalImageArray;
        //system timer, used to cause repaints
        private Timer mainTimer;
        //used for double buffering and drawing the components
        private Graphics imageGraphicalSurface;
        private Image doubleBufferImage;
        public AdditiveBlendingTest() {
            firstImage = Toolkit.getDefaultToolkit().getImage("Image1.jpg");
            secondImage = Toolkit.getDefaultToolkit().getImage("Image2.gif");
         //used to load image, MediaTracker process will not complete till the image is fully loaded
            MediaTracker tracker = new MediaTracker(this);
            tracker.addImage(firstImage,1);
         try {
             if(!tracker.waitForID(1,10000)) {
              System.out.println("Image1.jpg Load error");
              System.exit(1);
         } catch (InterruptedException e) {
             System.out.println(e);
         tracker = new MediaTracker(this);
         tracker.addImage(secondImage,1);
         try {
             if(!tracker.waitForID(1,10000)) {
              System.out.println("Image2.gif Load error");
              System.exit(1);
         } catch (InterruptedException e) {
             System.out.println(e);
         //calculate dimensions
         secondImageWidth = secondImage.getWidth(this);
         secondImageHeight = secondImage.getHeight(this);
         firstImageWidth = firstImage.getWidth(this);
         firstImageHeight = firstImage.getHeight(this);
         //creates image arrays
         firstImageArray = new int[firstImageWidth * firstImageHeight];
            secondImageArray = new int[secondImageWidth * secondImageHeight];
         //embeded if statements will be fully implemented in next version
         finalImageArray = new int[((secondImageWidth >= firstImageWidth) ? secondImageWidth : firstImageWidth) *
                 ((secondImageHeight >= firstImageHeight) ? secondImageHeight : firstImageHeight)];
         //PixelGrabber is used to created an integer array from an image, the values of each element of the array
         //represent an individual pixel.  FORMAT = 0xFFFFFFFF, with the channels (FROM MSB) Alpha, Red, Green, Blue
         //each taking up 8 bits (i.e. 256 possible values for each)
         try {
             PixelGrabber pgObj = new PixelGrabber(firstImage,0,0,firstImageWidth,firstImageHeight,firstImageArray,0,firstImageWidth);
             if(pgObj.grabPixels() && ((pgObj.getStatus() & ImageObserver.ALLBITS) != 0)){
         } catch (InterruptedException e) {
             System.out.println(e);
         try {
             PixelGrabber pgObj = new PixelGrabber(secondImage,0,0,secondImageWidth,secondImageHeight,secondImageArray,0,secondImageWidth);
             if (pgObj.grabPixels() && ((pgObj.getStatus() & ImageObserver.ALLBITS) !=0)) {
         } catch (InterruptedException e) {
             System.out.println(e);
         //adds the first images' values to the final painted image.  This is the only time the first image is involved
         //with the blend
         for(int cnt = 0,large = 0; cnt < (secondImageWidth*secondImageHeight);cnt++, large++){
             if (cnt % 300 == 0 && cnt !=0){
              large += (firstImageWidth - secondImageWidth);
             finalImageArray[cnt] = AdditiveBlendingTest.ALPHA + (AdditiveBlendingTest.ZERO_ALPHA & firstImageArray[large]) ;
         //final initializing
         this.setSize(clipX,clipY);
         this.enable();
         this.setVisible(true);
         yInsets = this.getInsets().top;
         xInsets = this.getInsets().left;
         this.addMouseListener(this);
         this.addWindowListener(this);
         doubleBufferImage = createImage(firstImageWidth,firstImageHeight);
         imageGraphicalSurface = doubleBufferImage.getGraphics();
        public void mouseEntered(MouseEvent e) {}
        public void mouseExited(MouseEvent e) {}
        public void mousePressed(MouseEvent e) {}
        public void mouseReleased(MouseEvent e) {}
        public void windowActivated (WindowEvent e) {}
        public void windowDeiconified (WindowEvent e) {}
        public void windowIconified (WindowEvent e) {}
        public void windowDeactivated (WindowEvent e) {}
        public void windowOpened (WindowEvent e) {}
        public void windowClosed (WindowEvent e) {}
        //when "x" in right hand corner clicked
        public void windowClosing(WindowEvent e) {
         System.exit(0);
        //used to progress the animation sequence (fires every 50 ms)
        public void actionPerformed (ActionEvent e ) {
         blend();
         repaint();
        //begins animation process and set's up timer to continue
        public void mouseClicked(MouseEvent e) {
         blend();
         mainTimer = new Timer(50,this);
         mainTimer.start();
         repaint();
         * workhorse of application, does the additive blending
        private void blend () {
         int pixel;
         int overflow;
         for (int cnt = 0,large = 0; cnt < (secondImageWidth*secondImageHeight);cnt++, large++) {
             if (cnt % 300 == 0 && cnt !=0){
              large += (firstImageWidth - secondImageWidth);
             //algorithm for blending was created by another user, will give reference when I find
             pixel = ( secondImageArray[cnt] & MASK7Bit ) + ( finalImageArray[cnt] & MASK7Bit );
             overflow = pixel & 0x1010100;
             overflow -= overflow >> 8;
             finalImageArray[cnt] = AdditiveBlendingTest.ALPHA|overflow|pixel ;
         //creates Image to be drawn to the screen
         finalImage = createImage(new MemoryImageSource(secondImageWidth, secondImageHeight, finalImageArray,
              0, secondImageWidth));
        //update overidden to eliminate the clearscreen call.  Speeds up overall paint process
        public void update(Graphics g) {
         paint(imageGraphicalSurface);
         g.drawImage(doubleBufferImage,xInsets,yInsets,this);
         g.dispose();
        //only begins painting blended image after it is created (to prevent NullPointer)
        public void paint(Graphics g) {
         if (finalImage == null){
             //setClip call not required, just added to facilitate future changes
             g.setClip(0,0,clipX,clipY);
             g.drawImage(firstImage,0,0,this);
             g.drawImage(secondImage,0,0,this);
         } else {
             g.setClip(0,0,clipX,clipY);
             g.drawImage(finalImage,0,0,this);
        public static void main( String[] args ) {
         AdditiveBlendingTest additiveAnimation = new AdditiveBlendingTest();
         additiveAnimation.setVisible(true);
         additiveAnimation.repaint();

  • How to create a image as a component

    Hi
    Thanks for all the help.
    Hope you can help me on this one also.
    I have a few dynamic pages .In each of this page i have a logo(a .jpg file) to be displayed at the top of each page. how do i make an image as a component in the portal & use it in my dynamic pages.
    Kindly reply
    Regards
    Sushant

    Hi,
    You can create an image as a shared component. But you cannot use this image directly on the dynamic page. The image should be used in a template and this template can be used in the dynamic page or any other component. But the problem with dynamic pages is that it does not support templates in release 1 and 2. It would be available only in the next release. The best way would be is to pick up the image from the mid tier.
    Thanks,
    Sharmila

  • Unable to create Disc Image from DVD

    I get the following error when trying to make a copy of a family wedding DVD. I'm using Disc Utility and creating the image as a DVD/CD master (.cdr) file. It gets to about 3/4 of the way and then gives the following error.
    The internal drive is a PIONEER DVD-RW DVR-K05
    Sep 10 22:13:24: Disk Utility started.
    Creating Image “Wedding of xxx & xxx.cdr”
    Reading VOLUME_IDENTIFIER (Apple_UDF : 0)...
    Unable to create “Wedding of Sarah & Federico.cdr” - Input/output error.
    I've tried twice now and the same error. Looks like I might have to use Toast/Popcorn etc?
    Thanks,
    Darren
    iMac G5 2.1GHz 1Gb RAM 260Gb HDD   Mac OS X (10.4.7)  

    I do not know what that error means. However, if you open up the Disk Utility & go into it's Help Menu & in the search field type duplicating a CD or DVD. There you will find detailed instructions on how to create a disc image from a DVD.
    Good possibility your answer may be found there and/or there may have been something you missed in creating a disc image.
    Good luck.

  • System Image Utility 10.6.3 - fails when creating NetBoot image from DVD

    System Image Utility 10.6.3, trying to create a NetBoot image from a bundled installer disc that came with a 27" Late 2009 iMac (iMac11,1). Image creation fails consistently, since the image that System Image Utility creates is only 901M.
    Anyone see this before?
    Don
    --------- System Image Utility log ----------
    Workflow Started (2010-06-16 14:03:02 -0700)
    Starting action: Define Image Source
    Finished running action: Define Image Source
    Starting action: Create Image
    Starting image creation process...
    Create NetBoot Image
    Initiating NetBoot from Install Media.
    Creating working path at /Library/NetBoot/NetBootSP0/NetBoot of Mac OS X Install DVD
    Creating disk image (Size: 901 MB)
    Finalizing disk image.
    created: /Library/NetBoot/NetBootSP0/NetBoot of Mac OS X Install DVD/NetBoot.dmg
    Attaching disk image
    Installing to destination volume
    2010-06-16 14:03:38.126 installer[2365:6f03] Looking for system packages
    2010-06-16 14:03:38.129 installer[2365:6f03] no system packages found
    2010-06-16 14:03:38.130 installer[2365:6f03] No or Invalid system receipts found on /private/tmp/mnt.LjFArn
    2010-06-16 14:03:38.130 installer[2365:6f03] Attempting fallback using: /System/Library/PrivateFrameworks/SystemMigration.framework/Resources/FallbackS ystemFiles.plist
    2010-06-16 14:03:38.175 installer[2365:6f03] Finding system files...
    2010-06-16 14:03:38.619 installer[2365:6f03] Writing system path cache.
    2010-06-16 14:03:38.623 installer[2365:6f03] Error writing cache to /private/tmp/mnt.LjFArn/Library/Caches/com.apple.FindSystemFiles.plist
    2010-06-16 14:03:38.625 installer[2365:6f03] Failed to enumerate /tmp/mnt.LjFArn/Library/Caches, cannot prune (
    "com.apple.userpictureCache"
    installer: Package name is Mac OS X
    installer: Installing at base path /private/tmp/mnt.LjFArn
    installer: The install failed (There is not enough space on this disk to install the selected items. Deselect at least 6.46 GB and try again.)
    Script is done.
    NetBoot creation failed.
    Image creation process finished...
    Stopping image creation.
    Image creation failed.

    Brian Nesse wrote:
    Hi Don, here's my guess...
    The 901 number is additional space added in the scripts. This indicates that the source image size was 0.
    Since you are making a NetBoot from Install media, under the covers the installer process is being run to create a NetBoot volume. The media shipped with the 27" iMac is most likely CPU specific and thus the installation fails because you are trying to create the image (i.e. install the system) on an unsupported CPU.
    In order to produce a NetBoot from the install media, you'll have to create it on the 27" iMac.
    Hi Brian,
    Thanks for the response. This makes perfect sense. I'll give this a try and shout back!
    Thanks,
    Don

  • Create an image from float array?

    Dear All,
    I have a float array containing pixel values. From that array I want to create an image (let's say in JPEG format).
    How should I do that?
    thanks

    Hi musti168,
    You're going through your entire image pixel-by-pixel and getting each of their values - why don't you just use the IMAQ ImageToArray function?  
    On this forum post I found an example of IMAQ ArrayToImage: http://forums.ni.com/t5/LabVIEW/IMAQ-arraytoimage-​example/td-p/68418
    You can use some of the IMAQ Image Processing palette to change the image to gray scale - possibly a threshold.
    Julian R.
    Applications Engineer
    National Instruments

  • Can iDVD create disc images from VIDEO_TS folder, and burn them?

    That first question is pretty self-explanatory.
    Background is this: I've downloaded some video folders/files from forum/torrent trading websites. When finished, I have a VIDEO_TS folder, often an EXTRAS_TS folder as well. A while back, I downloaded the app DVD IMAGER to create a disc image. Yesterday that stopped working effectively, so maybe I need to re-download, but I was wondering if there's just a better way? I also downloaded the app called BURN, but can't see yet how that creates disc images.
    Once I create that disc image, I need to burn it, and I was using Disk Utility for that. I'm really looking for some help and advice on the best way to perform these processes.
    Thank you, and let me know if I need to post in another forum.

    Additionally, do you have experience w/ DVD Imager?
    Nope. Like I said, Roxio's Toast Titanium is the top application (and is probably the one that most experienced people use).

  • Problem creating an image from a remote url

    I am creating a servlet which does the following:
    1. retrieves an image from a remote url
    2. resizes the image
    3. sends the image to the client.
    The servlet works fine when I run it on my PC, but when I run it on the server, it doesn't. Here's the problematic code
        private Image getRemoteImage(String imageUrl) throws Exception {
            System.err.println("in getRemoteImage()");
            if (!imageUrl.startsWith("http://")) imageUrl = "http://" + imageUrl;
            URL u = new URL(imageUrl);
            System.err.println("imageUrl: " + imageUrl);
            HttpURLConnection huc = (HttpURLConnection) u.openConnection();
            huc.setRequestMethod("GET");
            System.err.println("connecting...");
            huc.connect();
            System.err.println("Getting DataInputStream...");
            DataInputStream in = new DataInputStream(u.openStream());
            //DataInputStream in = new DataInputStream(huc.getInputStream());
            System.err.println("...got");
            int numBytes = huc.getContentLength(); //1063
            System.err.println("numBytes: " + numBytes);
            byte[] imageBytes = new byte[numBytes];
            System.err.println("reading fully...");
            in.readFully(imageBytes);
            System.err.println("...read");
            in.close();
            System.err.println("creating imageIcon");
            ImageIcon imageIcon = new ImageIcon(imageBytes);  //   <-- problem here
            System.err.println("** THIS LINE IS NOT REACHED **");
            System.err.println("creating image");
            Image image = imageIcon.getImage();
            System.err.println("returning image");
            return image;
        }When I access the servlet with FF, the browser reports:
    The image �<my servlet url>� cannot be displayed, because it contains errors.
    When I access the servlet with IE, I get:
    Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error
    type Exception report
    message Internal Server Error
    description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Servlet execution threw an exception
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:429)
         at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:495)
         at java.lang.Thread.run(Thread.java:534)
    root cause
    java.lang.NoClassDefFoundError
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:141)
         at java.awt.Toolkit$2.run(Toolkit.java:748)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:739)
         at javax.swing.ImageIcon.(ImageIcon.java:205)
         at myservlets.GetImage.getRemoteImage(GetImage.java:283)
         at myservlets.GetImage.processRequest(GetImage.java:73)
         at myservlets.GetImage.doGet(GetImage.java:394)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:429)
         at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:495)
         at java.lang.Thread.run(Thread.java:534)
    Any ideas?
    Cheers,
    James

    Cheers rebol.
    I've tried that (along with all other kinds of techniques I never knew existed). I think it might be a problem with the Tomcat setup - it may need to run headless (sounds a bit severe!...).

  • Is it possible to create an image from part of a png image???

    i have an image and i want to create 4 indivdual image from it in which they could be combined to reform the image that i have

    Its actually quite easy, first you create a new blank image the size of the section you need, then you draw the larger image onto the new image so that the section you want starts at the top left corner of the new image. I use the code below, which works fine.
    Image image = Image.createImage("/myimage.png");
    int width = [whatever the width of the new image is];
    int height = [whatever the height of the new image is];
    int x = [x position of where your image section starts];
    int y = [y position of where your image section starts];
    //Creates a new Blank Image where we will draw our
    //section on to
    Image imageSection = Image.createImage(width, height);
    Graphics g = imageSection.getGraphics();
    //set the clip
    g.setClip(0,0, width, height);
    //Draws our larger image onto our new image
    g.drawImage(image, -x, -y, g.TOP|g.LEFT);

Maybe you are looking for

  • Can I downgrade the software on my iPod touch from 4.2.1 to 4.1

    I recently upgraded the software on my 4th generation iPod touch from 4.1 to 4.2.1. Since then I can not use it in my car, the iPod is marked as unreadable. I wish to go back to my previous version of 4.1. Is this possible? I have sync'ed my iPod mul

  • Variable Assignment in General Precalculation tab of BI 7.0 broadcaster

    Hi,   In the broadcast setting, under General precalculation tab variable values can be set up. When we are clicking create variable values, screen with all the variables of the query were coming. After entering data in the variables and clicking OK,

  • Blue screen and no login at start up after 10.6 install

    After installing 10.6, I am not able to log into my MacBook Pro, unless I do so in safe mode. I get passed the grey apple/boot up screen, then rather than having the list of users, I just get a blue screen (the mouse is there). I have tried the follo

  • Aligning Decimal places in smartforms

    Hi All, In My requirement i need to align the amount field values properly. Here the amount should be decimal justified and should appear one beneath the other. Let us consider one example : I have 3 fields which i am displaying: Current Output: 1) T

  • How do you check you itune U review

    I wanted to see reviews for a specific I tune u course.  It had over 10 reveiws but I can only look at two which are shown to me by apple.  How can I see the rest of the reviews?  I want to see what people are saying.  Why would they not be available