Red cross on left panel in eclipse

Hi
I hv installed jdk1.5*, tomcat5.5, and eclipse on my pc. and also sysdeo tomcat eclipse pulgins in my pc.
I developed a servlet and stored it in this path.
C:\Eclipse\workspace\HitCount\hitcountServlet.java
and saved it.
Servlet code is as follows
import java.servlet.*;
import java.servlet.http.*;
import java.io.*;
import java.util.*;
public class hitcountServlet extends HttpServlet
     static int count;
     public void init(ServletConfig config) throws ServletException
          super.init(config);
     public void doGet(HttpServletRequest Req, HttpServletResponse res ) throws ServletException, IOException
     res.setContentType("text/html");
     PrintWriter out=res.getWriter();
     count++;
     out.println("<html>");
     out.println("<head><title> Basic Servlet </title> </head>");
     out.println("<body>");
     out.println("You are user no. :" + String.valueOf(count));
     out.println("</body></html>");
     public String getServletInfo()
          return "Basic Servlet Information";
But when I build this it is giving error list in problem window. for these lines
import javax.servlet.*;
import java.servlet.http.*;
and related to these httpServlet etc...
the error is cannot resolve.
what might be the problem.
plz help me out..... its urgent. As I hv to start my project ASAP.
Thanks in advance.
Message was edited by:
DKB

You need to add 'Servlet.jar' to your library for this project - download servlet.jar and then add to the project library in the Properties menu for your Eclipse project.
You also need to have the correct import statements as per the previous response.
Hope this helps.

Similar Messages

  • Red Cross for Television Streams only

    Hi Friends,
    I am facing a strange problem. There is no problem while
    running videos from youtube etc. but when try to run something from
    site like worldtvpc.com or idesitv.com it shows a red cross in left
    top corner.
    I have changed the security settings and tried many things
    but no use.
    This problem is for live streaming tv site. I can not
    identify what is the problem is it flash, or java or something
    else??
    May be someone here can help!!

    Hi Jenna,
    How you are displaying images in portal using KM or some other ways?
    Regards,
    Nivas209
    Edited by: Nivas209 on Jan 9, 2012 7:50 AM

  • I can't drag and drop any music from iTunes into the iPad tab on the left it just come up with a red cross ? Help !

    I just up loaded a load of music onto my computer and then when I press ctrl and s and try to drag the album tag over the iPad one it just comes up with a red cross and won't let me drop anything in it !

    You will need to Sync your iPad and all Music/Albums Selected will transfer over from iTunes..
    iOS: Syncing your data with iTunes
    http://support.apple.com/kb/HT1386

  • Red Cross with 2 dots underneath

    Have had the Black vision box for a while now and all has been fine, but all of a sudden one day , the red cross with 2 dots have come up, so anyone know how to get it back to normal? i have tried turning it off by the switch and holding the Ok button and down button at the same time i switch it on but then these cogs come up and then they load and take me right back to the red cross again! so how do i fix it?

    Did a search on te forums for red dot : Re: cogs of death
    Options
    on 19-10-2011 19h14
    Known as the red cross of doom, sadly.
    It means that the box failed to get an update applied and it is in a corrupt state.
    The only possible solution is a full factory reset which if successful will leave you with the box in the state it was delivered but with new software. It will however wipe all your recordings.
    Factory Reset
    Switch off the Vision+ box at the mains socket
    Hold down the front panel OK and down arrow buttons
    Switch on the power to the Vision+ box
    Allow the box to start up (about 15 seconds)
    Release the OK and down arrow buttons
    The Vision+ box will then contact the servers to get a new copy of its firmware
    This will take around 30 minutes
    If this doesn't work I'm afraid your box will need replaced, you can either contact the Mods or phone the helpline
    If you like a post, or want to say thanks for a helpful answer, please click on the Ratings star on the left-hand side of the post.
    If someone answers your question correctly please let other members know by clicking on ’Mark as Accepted Solution’
    Contact the Moderators
    http://www.btlife.bt.com/
    http://kafkasworld.com/
    My Radio Station
    Life | 1967 Plus Radio | 1000 Classical Hits | Kafka's World
    Someone Solved Your Question?
    Please let other members know by clicking on ’Mark as Accepted Solution’
    Helpful Post?
    If a post has been helpful, say thanks by clicking the ratings star.

  • Satellite C660D-1GD: no sound and Red Cross over speaker

    Just turned on my Laptop, Satellite C660D - 1GD and my sound isn't working.
    There is a red cross over the speaker and the diagnosis didn't help at all.
    Tried a system restore, nothing - no change at all. Tried going through the system drivers and there is no driver for sound :o. Ok, came to this site, downloaded the correct driver, installed and restarted and nothing again :s .
    Updated the BIOS and then went into and checked the BIOS, and even checked for simple sound to just have my time wasted. Any help would be great.
    Thanks in advance.

    _Firstly:_
    Did you check if mute isnt enabled?
    Press FN + ESC to enable or disable mute
    _Secondly:_
    Go to control panel -> sound -> Playback tab
    Check if the devices in the playback tab are activated and set as default device
    Additionally click right to ensure that options are marked like; show hidden devices, show disabled devices
    _Thirdly:_
    The sound card is from Realtek.
    So you can download the Realtek HD audio driver from Realtek driver page
    Before installing new driver, uninstall installed Realtek driver from control panel -> programs & features

  • The applet fails to load. with 'red cross' screen JVM 1.6.19 and above

    After updating the JVM to one of the latest version 1.6 builds, our users started to experience a problem with opening java applets.
    All the users have JVM versions 1.6.0_19 – 1.6.0_26 on Windows 7/2008. The browser is IE8. On the server usually there is IIS7, with ‘Integrated Windows authentication’
    on applet’s virtual folder. Applet’s classes are packaged into a signed JAR file. Both the client and the server are located in the same local area network with no proxy or firewall between them.
    The applet’s website usually belongs to the trusted security zone. When loaded, the applet establishes HTTP connection to the server to get the necessary data.
    When the user tries to open an HTML page containing the applet, there can be the following scenarios:
    1.     The applet fails to load. We’re getting a ‘red cross’ screen. All the HTML elements except of the applet are loaded OK.
    From the IIS log we can see that the loading of the JAR file failed with the error code 401, the user name field in the log for the JAR is empty.
    2.     The java asks for the user name and password showing a popup ‘Authentication required’. At this moment we can see the following message in the Java console:
    network: Firewall authentication: site=/XX.XX.XX.XX:XX, protocol=http, prompt=, scheme=ntlm
    If the user enters the correct credentials, the applet loads OK. Even if the user checks the ‘Save the password in your password list’ checkbox, Java continues to ask for credentials
    on every page reload. It’s worth to note that the company’s external firewall doesn’t get any requests from the applet.
    The problems happen even when the client and the server are located on the same machine, but never happens when we use localhost as the server name in the page URL.
    During investigations we found out the following workarounds:
    1.     Enabling anonymous authentication on the virtual folder always solves the problem.
    2.     Sometimes, changing security zone from ‘Trusted’ to ‘Local intranet’ solves the scenario 2 (‘Authentication required’ popup) problem.
    It’s worth to note that changing the security zone never helps if the page URL contains dots (for example, uses IP address instead the server name).
    3.     Upgrading to IE9 solves the scenario 2 problem partly: Java asks for the credentials only once.

    I have the same issue. I use single sign-on with IIS 7 and Integrated Window authentication on the tomcat virtual folder. The applet jar file is on the root directory of the web application (the same level of index.html). So I use '.' as the code_base to call the applet from javascript.
    So when I launch my web application into a browser, the auto-connection is successfully performed (single sign-on through Upstream, kerberos, remote_user, ...). But when I want to launch the applet in the web application, a new authentication panel (red panel with "authentication required") occurs in order to set credentials (login, password, domain) with the message in the java applet console:
    "network: Firewall authentication: site=myApplicationUrl, protocol=http, prompt=, scheme=ntlm"
    So why the applet doesn't inherit previous credentials in this case ??
    Have you solved this problem ?
    Thanks
    Edited by: 886341 on 20 sept. 2011 08:56

  • Avoid the display of the red cross when the image is absent

    The user upload images to my web site.
    He can enter 3 images; but sometimes he enters only 2.
    When an image is absent, the browser try to find it and
    display a small red cross at the left corner. My concern was to
    avoid the display of this small red cross when the image is not
    there?
    I tried to imbricate HTML and PHP code, but it does not work.
    Is there somebody who can help me?
    Thanks a lot.

    <td><?php echo ($dest_fichier1!=''?'<img
    src="images/annonces/' .
    $dest_fichier1.'">':'' ?></td>
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Annie Benech" <[email protected]> wrote in
    message
    news:ek7841$is4$[email protected]..
    > The user upload images to my web site.
    > He can enter 3 images; but sometimes he enters only 2.
    > When an image is absent, the browser try to find it and
    display a small
    > red
    > cross at the left corner. My concern was to avoid the
    display of this
    > small red
    > cross when the image is not there?
    > I tried to imbricate HTML and PHP code, but it does not
    work.
    > Is there somebody who can help me?
    > Thanks a lot.
    >
    > <div class="boite-niveau2">
    > <div class="boite-present-immo">
    > <table width="600" border="0" cellspacing="0"
    cellpadding="0">
    > <tr>
    > <td><table width="300" border="0"
    cellspacing="4" cellpadding="0">
    > <tr>
    > <td><img src= "<?php echo "images/annonces/"
    . $dest_fichier1 ?>"
    > width="300" /></td>
    > </tr>
    > <tr>
    > <td><table width="300" border="0"
    cellspacing="0" cellpadding="0">
    > <tr>
    > <td><img src= "<?php echo "images/annonces/"
    . $dest_fichier2
    > ?>"
    > width="148" /></td>
    > <td width="2"> </td>
    > <td><img src= "<?php echo "images/annonces/"
    . $dest_fichier3
    > ?>"
    > width="148" /></td>
    > </tr>
    > </table></td>
    > </tr>
    > </table></td>
    > <td width="20"> </td>
    > <td width="270"><?php
    > if ( $_SESSION['type_annonce'] == 'vente' )
    > {
    > echo "Vends ";
    > }
    > else
    > {
    > echo "Loue ";
    > }
    > echo "{$_SESSION['type_de_bien']}";
    >
    > echo " à <b>{$_SESSION['commune']}</b>
    <br>";
    >

  • Red cross icon on BBM.

    Hi, I am new to the forum so please bear with me if this question has been asked before.  
    When I have typed my message and hit send I get a red cross on the left of the screen. I am also unable to recieve any messages.  
    This has only started to happen since yesterday.     
    Any help or advice would be really appreciated.   
    Thanks in advance,  
    Lucy.

    Hello lucy
    Please try this in the same sequence,to see if it helps :
     1- Register your Handheld .
    KB00510 How to register a BlackBerry smartphone with the wireless network
    Wait till a Registration messages comes in your message box.
    2- Resend your Service Book
    KB02830 Send the service books for the BlackBerry Internet Service
    3-  Then perform a battery pull restart like this while the device is powered On remove your battery wait for a min. then reinsert it back.
    Please try and if it does not work then I think you need to contact or call your carrier Orange to know if there is any issue with BIS on there Network.
    Prince
    Click " Like " if you want to Thank someone.
    If Problem Resolves mark the post(s) as " Solution ", so that other can make use of it.
    Click " Like " if you want to Thank someone.
    If Problem Resolves mark the post(s) as " Solution ", so that other can make use of it.

  • CUPC 8.6.1 with red cross which means no ringing

    Hello!
    In some way, we have the problem, that cupc change it's presence status from DND to available. The red presence indicators changes from red to green, but sometimes, the red cross on the handset icon didn't change, so I have the setup that I have a green presence indicator, but a red cross which means that I cannot hear incoming calls. If you change status back to DND and then back to available brings no success, also restarting the cupc client is unsuccessfull. I do not know when exactly this happens, a lot of users are telling me about this issue. I then have to manually onhook the DND status in device settings of the framework services client of the cupc endpoint to get it running again, that user hear the sound of incoming calls.
    Can someone help? Any idea? Someone aware of this issue/bug?
    We are using CUPC 8.6.1 and CUCM 8.6.2
    Thanks!

    No one an idea?

  • FEBA :Banking: Red Cross on bank statement upload

    Hello Gurus,
    I am facing a strange behaviour in electronic bank statement uploads.
    The file is uploaded in the system and its shown as Red cross. There are no transactions in the bank statement and the opening and closing balances are same.
    There is no activity in the bank account and still on loading the satement it shows a Red Cross for file loaded on June 20th.
    The file coming on June23rd is loaded successfully and has a green checkbox where again there were no transactions and opening and closing balances are tallied.
    I dont see any value or sign difference. I checked other threads but couldnt get solution and had to open a new discussion
    Any thoughts on how we can change the red cross to Green Tick. SAP instance is on ECC 6.0.
    Any utility to be developed?
    Regards
    Rutvij

    Hello Rutvij,
    FEBAN - give Co.code, house bank, account id, statement date and statement nubmer.
    If it is outgoing payment then go to statement items i con in top side of that screen. Then click post option.
    In the next screen click on payment order because if you want to clear invoices based on payment orders or click either reference or document number in additional selections tab. And then give your co.code and account type. If required, put additional selection like amount, reference, etc in additonal selections tab.
    Press enter and then select open items to be cleared and then save.
    Now SAP will display all open invoices against the customers. Activate the invoices that must be cleared. Simulate document. Now enter the payment amount and press enter.
    Enter once again in the next screen then press save. Now you will get a message saying that document got posted with no.xxxx in co.code
    I hope it will resolve your issue else revert us with your query.
    Thanks & Regards,
    Lakshmi S

  • I've created new User account on my PC for separate itunes library/account. Have had to change apple id to do this. When I connect to pc, itunes opens with CDs I've already loaded, but it doesn't recognise ipod. No left panel opens with devices. Help!

    Can anyone help? Two ipods with originally one itunes library and (I think) same Apple id). Now need 2 Libraries with separate account for separate buying etc. Recommended I create new library on separate PC User account which I have done together with new apple id. I have added this apple id to the ipod needing separate account. When I hook up, I can't sync. No 'Devices' left panel appears at all. I'm at a loss here so any help woudl be great. Thanks.

    If you  have iTunes 11 turn on the Sidebar. Go to iTunes>View and click on Show Sidebar. You can also do a Crtl+S to show the sidebar. The sidebar is where Devices appears. and Control+B to show the Menu bar
    If necessary:
    iOS: Device not recognized in iTunes for Windows
    or
    iOS: Device not recognized in iTunes for Mac OS X

  • I tried down loading mozilla firefox to use as a web browser. It was downloaded 100% then when prompted to "run" the error message comes up with a red cross and the message'This file is corrupted" and won't let me proceed. What do I do now?

    I tried down loading mozilla firefox to use as a web browser. It was downloaded 100% then when prompted to "run" An error message comes up with a red cross and the message'This file is corrupted" and won't let me proceed. What do I do now?

    It is possible that your anti-virus software is corrupting the downloaded files or otherwise interfering with downloading files by Firefox.<br />
    You can try to disable the real-time (live) scanning of files in your anti-virus software temporarily to see if that makes downloading work.
    See http://kb.mozillazine.org/Unable_to_save_or_download_files

  • A red cross has come up on the screen of my Ipod classic, what do I do?

    my ipod classic was out of charge so i have charged it for 24 hours. when i went back on to it it came up with a red cross and said that i had to go the support page but i cant find anything and need help. any suggestions.

    iPod Displays a Red "X" Icon
    tt2

  • How do I get network drives to show in left panel of media browser

    Okay, I'm new to audition.  When I start Audition's media browser, only the local HDD's are shown.  If I OPEN FILE, I can navigate to find tyhe network drive and Audition will open the file.  Also the network drives show in Windows Explorer.  I searched the FAQs and the help file, but maybe I'm not using the "magic words"  So, how to I get these network drives to appear?
    Windows 7 64 bit home premium
    home built 3.67 gb Intel Quad core, 12 GB RAM, Several local HDDs
    Audition CS6
    Thank you

    I'm not sure this is correct.  I have mapped a NAS to drive "Z" and mapped a drive on my video editing desktop to drive "Y."  These both show up in the left panel of the media browser for Premiere and Photoshop as the share names  "MYDOCS" and "BAAAA,"  as well as in Windows Explorer.  But not in Audition. Only the local drives are shown in Audition's media browser.
    I can open a file in audition by using BROWSE by clicking on "MYDOCS" or "BAAAA" as they appear in the Windows Explorer file dialong and then navigating on those drives to the desired files.
    What am I missing?  Do others have their network drives show in the left panel of Audition's media browser?

  • How to drag image in left panel then drop into right panel??

    Dear friends.
    I have following code, it is runnable, just add two jpg image files is ok, to run.
    I tried few days to drag image from left panel then drop into right panel or vice versa, but not success, can any GUI guru help??
    Thanks.
    Sunny
    [1]. main code/calling code:
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class ImagePanelCall extends JComponent {
         public  JSplitPane ImagePanelCall() {
              setPreferredSize(new Dimension(1200,300));
              JSplitPane          sp = new JSplitPane();
              sp.setPreferredSize(new Dimension(1200,600));
              sp.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
              add(sp);
              ImagePanel     ip = new ImagePanel();
              ImagePanel     ip1 = new ImagePanel();
              ip.setPreferredSize(new Dimension(600,300));
              ip1.setPreferredSize(new Dimension(600,300));
              sp.setLeftComponent(ip);// add left part
              sp.setRightComponent(ip1);// add right part
              sp.setVisible(true);
              return sp;
         public static void main(String[] args) {
              JFrame frame = new JFrame("Test transformable images");
              ImagePanelCall  ic = new ImagePanelCall();
              frame.setPreferredSize(new Dimension(1200,600));
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.getContentPane().add(ic.ImagePanelCall(), BorderLayout.CENTER);
              frame.pack();
              frame.setVisible(true);
    }[2]. code 2
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class ImagePanel extends JComponent {
         private static final Cursor DEFAULT_CURSOR = new Cursor(Cursor.DEFAULT_CURSOR);
         private static final Cursor MOVE_CURSOR = new Cursor(Cursor.MOVE_CURSOR);
         private static final Cursor VERTICAL_RESIZE_CURSOR = new Cursor(Cursor.N_RESIZE_CURSOR);
         private static final Cursor HORIZONTAL_RESIZE_CURSOR = new Cursor(Cursor.W_RESIZE_CURSOR);
         private static final Cursor NW_SE_RESIZE_CURSOR = new Cursor(Cursor.NW_RESIZE_CURSOR);
         private static final Cursor NE_SW_RESIZE_CURSOR = new Cursor(Cursor.NE_RESIZE_CURSOR);
         public Vector images;
         * Create an ImagePanel with two images in.
         * A MouseHandler instance is added as mouse listener and mouse motion listener.
         public ImagePanel() {
              images = new Vector();
              images.add(new TransformableImage("swing/dnd/Bird.gif"));
              images.add(new TransformableImage("swing/dnd/Cat.gif"));
              setPreferredSize(new Dimension(600,600));
              MouseHandler mh = new MouseHandler();
              addMouseListener(mh);
              addMouseMotionListener(mh);
         * Simply paint all the images contained in the Vector images, calling their method draw(Graphics2D, ImageObserver).
         public void paintComponent(Graphics g) {
              Graphics2D g2D = (Graphics2D)g;
              for (int i = images.size()-1; i>=0; i--) {     
                   ((TransformableImage)images.get(i)).draw(g2D, this);
         * Inner class defining the behavior of the mouse.
         final class MouseHandler extends MouseInputAdapter {
              private TransformableImage draggedImage;
              private int transformation;
              private int dx, dy;
              public void mouseMoved(MouseEvent e) {
                   Point p = e.getPoint();
                   TransformableImage image = getImageAt(p);
                   if (image != null) {
                        transformation = image.getTransformation(p);
                        setConvenientCursor(transformation);
                   else {
                        setConvenientCursor(-1);
              public void mousePressed(MouseEvent e) {
                   Point p = e.getPoint();
                   draggedImage = getImageAt(p);
                   if (draggedImage!=null) {
                        dx = p.x-draggedImage.x;
                        dy = p.y-draggedImage.y;
              public void mouseDragged(MouseEvent e) {
                   if (draggedImage==null) {
                        return;
                   Point p = e.getPoint();
                   repaint(draggedImage.x,draggedImage.y,draggedImage.width+1,draggedImage.height+1);
                   draggedImage.transform(p, transformation,dx,dy);
                   repaint(draggedImage.x,draggedImage.y,draggedImage.width+1,draggedImage.height+1);
              public void mouseReleased(MouseEvent e) {
                   Point p = e.getPoint();
                   draggedImage = null;
         * Utility method used to get the image located at a Point p.
         * Returns null if there is no image at this point.
         private final TransformableImage getImageAt(Point p) {
              TransformableImage image = null;
              for (int i = 0, n = images.size(); i<n; i++) {     
                   image = (TransformableImage)images.get(i);
                   if (image.contains(p)) {
                        return(image);
              return(null);
         * Sets the convenient cursor according the the transformation (i.e. the position of the mouse over the image).
         private final void setConvenientCursor(int transfo) {
              Cursor currentCursor = getCursor();
              Cursor newCursor = null;
              switch (transfo) {
                   case TransformableImage.MOVE : newCursor = MOVE_CURSOR;
                        break;
                   case TransformableImage.RESIZE_TOP : newCursor = VERTICAL_RESIZE_CURSOR;
                        break;
                   case TransformableImage.RESIZE_BOTTOM : newCursor = VERTICAL_RESIZE_CURSOR;
                        break;
                   case TransformableImage.RESIZE_LEFT : newCursor = HORIZONTAL_RESIZE_CURSOR;
                        break;
                   case TransformableImage.RESIZE_RIGHT : newCursor = HORIZONTAL_RESIZE_CURSOR;
                        break;
                   case TransformableImage.RESIZE_TOP_LEFT_CORNER : newCursor = NW_SE_RESIZE_CURSOR;
                        break;
                   case TransformableImage.RESIZE_TOP_RIGHT_CORNER : newCursor = NE_SW_RESIZE_CURSOR;
                        break;
                   case TransformableImage.RESIZE_BOTTOM_LEFT_CORNER : newCursor = NE_SW_RESIZE_CURSOR;
                        break;
                   case TransformableImage.RESIZE_BOTTOM_RIGHT_CORNER : newCursor = NW_SE_RESIZE_CURSOR;
                        break;
                   default : newCursor = DEFAULT_CURSOR;
              if (newCursor != null && currentCursor != newCursor) {
                   setCursor(newCursor);
         public static void main(String[] args) {
              JFrame frame = new JFrame("Test transformable images");
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.getContentPane().add(new ImagePanel(), BorderLayout.CENTER);
              frame.pack();
              frame.setVisible(true);
    }[3]. code 3
    import java.awt.*;
    import javax.swing.*;
    import java.awt.image.*;
    public final class TransformableImage extends Rectangle {
         public static final int MOVE = 0;
         public static final int RESIZE_TOP = 10;
         public static final int RESIZE_BOTTOM = 20;
         public static final int RESIZE_RIGHT = 1;
         public static final int RESIZE_LEFT = 2;
         public static final int RESIZE_TOP_RIGHT_CORNER = 11;
         public static final int RESIZE_TOP_LEFT_CORNER = 12;
         public static final int RESIZE_BOTTOM_RIGHT_CORNER = 21;
         public static final int RESIZE_BOTTOM_LEFT_CORNER = 22;
         public static final int BORDER_THICKNESS = 5;
         public static final int MIN_THICKNESS = BORDER_THICKNESS*2;
         private static final Color borderColor = Color.black;
         private Image image;
         * Create an TransformableImage from the image file filename.
         * The TransformableImage bounds (inherited from the class Rectangle) are setted to the corresponding values.
         public TransformableImage(String filename) {
              ImageIcon ic = new ImageIcon(filename);
              image = ic.getImage();
              setBounds(0,0,ic.getIconWidth(), ic.getIconHeight());
         * Draw the image rescaled to fit the bounds.
         * A black rectangle is drawn around the image.
         public final void draw(Graphics2D g, ImageObserver observer) {
              Color oldColor = g.getColor();
              g.setColor(borderColor);
              g.drawImage(image, x, y, width, height, observer);
              g.draw(this);
              g.setColor(oldColor);
         * Return an int corresponding to the transformation available according to the mouse location on the image.
         * If the point p is in the border, with a thickness of BORDER_THICKNESS, around the image, the corresponding
         * transformation is returned (RESIZE_TOP, ..., RESIZE_BOTTOM_LEFT_CORNER).
         * If the point p is located in the center of the image (i.e. out of the border), the MOVE transformation is returned.
         * We allways suppose that p is contained in the image bounds.
         public final int getTransformation(Point p) {
              int px = p.x;
              int py = p.y;
              int transformation = 0;
              if (py<(y+BORDER_THICKNESS)) {
                   transformation += RESIZE_TOP;
              else
              if (py>(y+height-BORDER_THICKNESS-1)) {
                   transformation += RESIZE_BOTTOM;
              if (px<(x+BORDER_THICKNESS)) {
                   transformation += RESIZE_LEFT;
              else
              if (px>(x+width-BORDER_THICKNESS-1)) {
                   transformation += RESIZE_RIGHT;
              return(transformation);
         * Move the left side of the image, verifying that the width is > to the MIN_THICKNESS.
         public final void moveX1(int px) {
              int x1 = x+width;
              if (px>x1-MIN_THICKNESS) {
                   x = x1-MIN_THICKNESS;
                   width = MIN_THICKNESS;
              else {
                   width += (x-px);
                   x = px;               
         * Move the right side of the image, verifying that the width is > to the MIN_THICKNESS.
         public final void moveX2(int px) {
              width = px-x;
              if (width<MIN_THICKNESS) {
                   width = MIN_THICKNESS;
         * Move the top side of the image, verifying that the height is > to the MIN_THICKNESS.
         public final void moveY1(int py) {
              int y1 = y+height;
              if (py>y1-MIN_THICKNESS) {
                   y = y1-MIN_THICKNESS;
                   height = MIN_THICKNESS;
              else {
                   height += (y-py);
                   y = py;               
         * Move the bottom side of the image, verifying that the height is > to the MIN_THICKNESS.
         public final void moveY2(int py) {
              height = py-y;
              if (height<MIN_THICKNESS) {
                   height = MIN_THICKNESS;
         * Apply a given transformation with the given Point to the image.
         * The shift values dx and dy are needed for move tho locate the image at the same relative position from the cursor (p).
         public final void transform(Point p, int transformationType, int dx, int dy) {
              int px = p.x;
              int py = p.y;
              switch (transformationType) {
                   case MOVE : x = px-dx; y = py-dy;
                        break;
                   case RESIZE_TOP : moveY1(py);
                        break;
                   case RESIZE_BOTTOM : moveY2(py);
                        break;
                   case RESIZE_LEFT : moveX1(px);
                        break;
                   case RESIZE_RIGHT : moveX2(px);
                        break;
                   case RESIZE_TOP_LEFT_CORNER : moveX1(px);moveY1(py);
                        break;
                   case RESIZE_TOP_RIGHT_CORNER : moveX2(px);moveY1(py);
                        break;
                   case RESIZE_BOTTOM_LEFT_CORNER : moveX1(px);moveY2(py);
                        break;
                   case RESIZE_BOTTOM_RIGHT_CORNER : moveX2(px);moveY2(py);
                        break;
                   default :
    }

    I gave you a simple solution in your other posting. You never responded to the suggestion stating why the given solution wouldn't work, so it can't be that urgent.

Maybe you are looking for