VPN Phase 1 briefly comes up, then drops

Hello
I wonder if it is the Crypto transform-set
Peer is using: ESP_AES_256_SHA
I am using.
crypto map VPN 780 set transform-set AES_256_SHA
crypto map VPN 790 set peer 74.x.x.x
crypto map VPN 790 set transform-set AES_256_SHA
Could this difference be causing problems with phase 1
I tried to change my end, but received “ERROR: transform set with tag "ESP_AES_256_SHA" does not exist.”
Please review and advise.

Jouni
Please review and advise.
MyASA# show run crypto ipsec
crypto ipsec transform-set AES_256_SHA esp-aes-256 esp-sha-hmac
crypto ipsec transform-set 3DES_SHA esp-3des esp-sha-hmac
crypto ipsec transform-set AES_SHA esp-aes esp-sha-hmac
crypto ipsec transform-set 3DES_MD5 esp-3des esp-md5-hmac
crypto ipsec df-bit clear-df outside
MyASA# sh run crypto map | in 790
crypto map VPN 790 match address (PeerNm)
crypto map VPN 790 set peer 74.x.x.x
crypto map VPN 790 set transform-set AES_256_SHA
PeerASA#show run crypto ipsec
crypto ipsec transform-set ESP-AES-256-SHA esp-aes-256 esp-sha-hmac
crypto ipsec transform-set ESP-3DES-MD5 esp-3des esp-md5-hmac
crypto ipsec transform-set ESP-AES-128-SHA esp-aes esp-sha-hmac
crypto ipsec transform-set ESP-AES-256-MD5 esp-aes-256 esp-md5-hmac
crypto ipsec transform-set trans esp-3des esp-sha-hmac
crypto ipsec transform-set trans mode transport
crypto ipsec transform-set ESP-AES-128-MD5 esp-aes esp-md5-hmac
crypto ipsec transform-set ESP-DES-MD5 esp-des esp-md5-hmac
crypto ipsec transform-set ESP-DES-SHA esp-des esp-sha-hmac
crypto ipsec transform-set ESP-AES-192-MD5 esp-aes-192 esp-md5-hmac
crypto ipsec transform-set ESP-3DES-SHA esp-3des esp-sha-hmac
crypto ipsec security-association lifetime seconds 28800
crypto ipsec security-association lifetime kilobytes 4608000
PeerASA# sh run crypto map | in 595
crypto map outside_map 595 match address outside_595_cryptomap
crypto map outside_map 595 set peer 170.x.x.x
crypto map outside_map 595 set transform-set ESP-AES-256-SHA
crypto map outside_map 595 set security-association lifetime seconds 28800
crypto map outside_map 595 set security-association lifetime kilobytes 4608000

Similar Messages

  • TS3406 i have an apple 4s. had no probems until lately when bluetooth capablility and wifi continue to drop off and then come back, then drop off again.  verizon guy says, of course, i need a new phone, because by phone can't handle ios7,

    iphone 4s, updated to ios7.  now dropping bluetooth and wifi all the time.  can you help?

    Hey whitnep!
    I have two articles that I believe will help you troubleshoot these issues with your iPhone:
    iOS: Troubleshooting Wi-Fi networks and connections
    http://support.apple.com/kb/ts1398
    iOS: Troubleshooting Bluetooth connections
    http://support.apple.com/kb/TS4562
    Take care, and thanks for visiting the Apple Support Communities.
    -Braden

  • Wake from sleep - screen briefly comes on and then goes black

    I have a late 2010 mbp 17" model with no issues until last night.
    I have my computer plugged in, and when it's not in use I close the display down and the computer enters sleep mode.  When waking it from sleep, the screen will briefly come on and then go black.  After a few opening and closings of the display, the display will remain on - the number of times opening and closing the display varies before it remains on.
    An easier solution I just tried is by unplugging the computer from power - the display comes right on and remains that way.
    When the display goes out, the keyboard backlight remains lit.
    The only thing I recall that would have any sort of adverse affect on this is the static electricity that I had with this yesterday or the day before.  I live in a dry climate and was shocked when I touched the computer the other day.  Nothing really bad, but could this be the culprit?  Again, I have never had any issues like this before.
    Is there a solution to this?  Within the energy saver, the settings (except the amount of time before the computer/display goes to sleep) is identical for both powered and battery sources.
    Thank you for any help.
    - Jeff

    To add, I have tried the following:
    Open Terminal
    Type the following:
         pmset -g | grep hibernatemode
    It should say something like:
         hibernatemode  3
    Here's an explanation of the different types of hibernate modes:
    0 - Old style sleep mode, with RAM powered on while sleeping, safe sleep disabled, and super-fast wake.
    1 - Hibernation mode, with RAM contents written to disk, system totally shut down while “sleeping,” and slower wake up, due to reading the contents of RAM off the hard drive.
    3 - The default mode on machines introduced since about fall 2005. RAM is powered on while sleeping, but RAM contents are also written to disk before sleeping. In the event of total power loss, the system enters hibernation mode automatically.
    5 - This is the same as mode 1, but it’s for those using secure virtual memory (in System Preferences -> Security).
    7 - This is the same as mode 3, but it’s for those using secure virtual memory.
    To change your sleep mode, use the following command:
         sudo pmset -a hibernatemode 0
    (replace 0 with whatever hibernate mode you desire)"
    Also - the white light that comes on while in sleep mode on the front right of the computer does not fade in and out like it used to...
    Gah, I don't like issues

  • When I try to open the "markets" page on the Firefox hompage, it displays for 3 or 4 seconds and then drops off; I get a white screen; this does not happen with Explorer.

    When I open "markets" from the homepage, it comes up but drops off after a few seconds and
    I get a white page. This does not happen with Explorer. A similar but much more extensive
    problem happened a month or so ago (I couldn't open attachments). I called Microsoft and the
    fellow messed about with my computer for an hour or so, but ended up saying he couldn't help
    me. However, when he went away, the problems went away.
    == This happened ==
    Every time Firefox opened
    == two weeks ago?

    ~~red:<u>'''''displays for 3 or 4 seconds and then drops off'''''</u>~~
    If you have RealPlayer Browser Record Plugin <u>'''extension'''</u>, disable/remove the RealPlayer Browser Record Plugin extension in the RealPlayer Preferences (RP: Tools > Preferences > Download & Recording) . Restart Firefox and test.
    <u>See Noah_SUMO's illustrated answer in this thread if the above is not clear:</u> https://support.mozilla.com/en-US/forum/1/557689?
    The RealPlayer Browser Record Plugin <u>'''extension'''</u> adds some extra features like saving media files.
    Be sure not to get confused with the RealPlayer <u>'''plugin'''</u> (Tools > Add-ons > Plugins) that plays media files.
    https://support.mozilla.com/en-US/forum/1/557689?
    http://support.mozilla.com/en-US/forum/1/459823
    https://support.mozilla.com/en-US/forum/1/446905?
    https://support.mozilla.com/tiki-view_forum_thread.php?forumId=1&comments_parentId=472596
    http://support.mozilla.com/en-US/forum/1/461211
    http://support.mozilla.com/en-US/forum/1/376867
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]].
    ~~red:<u>'''''Other Issues'''''~~: to correct security/stability issues</u>
    <u>'''Update Java'''</u>: your ver. 1.6.0.17; current ver. 1.6.0.20 (<u>important security update 04-15-2010</u>)
    ''(Windows users: Do the manual update; very easy.)''
    See: '''[http://support.mozilla.com/en-US/kb/Using+the+Java+plugin+with+Firefox#Updates Updating Java]'''
    Do the update with Firefox closed.
    <u>'''Update Shockwave for Director'''</u>: your version 11.0; current version 11.5
    NOTE: this is not the same as Shockwave Flash; this installs the Shockwave Player.
    SAVE the installer to your hard drive (Desktop is a good place so you can find it). When the download is complete, exit Firefox (File > Exit), locate and double-click in the installer you just downloaded, let the install complete.
    IMPORTANT: I have found it wise to always restart your system after doing anything with Adobe products.
    See: '''[http://support.mozilla.com/en-US/kb/Using+the+Shockwave+plugin+with+Firefox#_Installing_Shockwave Installing Shockwave]'''

  • HT1341 Epson Stylus SX435W otherwise known as Workforce 435. Although Apple promises software drivers on-line attempts at downloading and ADDING repeatedly come up with drop down menu "...it is not currently available from the software server". Please hel

    Epson Stylus SX435W otherwise known as Workforce 435. Adding Driver to an iMac
    Although Apple promises software drivers on-line, my attempts at downloading and ADDING it to my iMac
    repeatedly come up with drop down menu "...it is not currently available from the  Software update server". Please help?
    I have downloaded all the Epson Printer Software but I cannot make the final step.

    Reset the printing system and then try adding the printer again.
    http://support.apple.com/kb/ht1341
    (You have installed, not just downloaded the Epson driver, right?)

  • Firefox begins to start but then stops before loading any screen. Profile manager/safe mode appear then disappear. Task manager shows programs briefly in CPU then they disappear. Uninstall & reload makes no difference. Any ideas please ?

    When we clicked as usual on the firefox icon the egg-timer started then went off. Nothing started up.
    Checking the Task Manager showed firefox.exe briefly using the CPU then it dropped off the list.
    We tried to uninstall and reload from the mozilla site (http://www.mozilla-europe.org/en/firefox/). Installation seemed to work ok, but the same problem recurred when we tried to start firefox.
    Did this again, this time removing bookmarks, etc. same result.
    Tried to use the profile manager - the screen came up but disappeared before we could use it.
    Same thing happened when we tried to start in safe mode - screen briefly appeared but then disappeared.
    Tried googling in IE to solve the problem but nothing seems to apply.
    Have run all security checks but no apparent bugs or problems.
    Have had to abandon firefox and use another browser. How do we get it back please ?

    Did you check your security software (firewall)?
    A possible cause is security software (firewall) that blocks or restricts Firefox without informing you about that, possibly after detecting changes (update) to the Firefox program.
    Remove all rules for Firefox from the permissions list in the firewall and let your firewall ask again for permission to get full unrestricted access to internet for Firefox.
    See [[Server not found]] and [[Firewalls]] and http://kb.mozillazine.org/Firewalls

  • VPN works 1-2 times then stops, if I reboot router, it works again

    I have a Mac Pro Leopard Server sitting behind my AP Extreme with VPN ports forwarded. The router will let me connect from the internet to the server one or two times using VPN without any problems but then the next time I try to log in, the router will not let any VPN traffic flow to the server (nothing shows up in server's VPN logs, even though internet still works). If I reboot the router, I can connect again using VPN but if I disconnect and reconnect a couple times, there will always come a time when I cannot reconnect until I reboot the router again. Rinse and repeat.
    Nothing seems to be showing up in the router's logs either, although it keeps repeating that "administrative access denied to:" followed by my server's local IP address. But I notice that it will say this even during the times I can connect.
    What is going on?
    Message was edited by: johnthomjr

    have you fixed this? I am having similar problem on one or our servers (10.5) behind a Cisco router. I never have this problem with our servers (10.4) behind APE's. I have gone so far as to make this particular server the DMZ host for the LAN and it still gets no traffic ( in the VPN logs) unless the router is restarted. I have no solution, just adding my own special twist on the problem.

  • I have CS5 and LR5. they will not talk anymore. Everything was working 5 days ago. I can no longer access CS5 from LR5 edit, then drop it back into LR5. Need support

    I have CS5 and LR5. they will not talk anymore. Everything was working 5 days ago. I can no longer access CS5 from LR5 edit, then drop it back into LR5. Need support

    BOILERPLATE TEXT:
    If you give complete and detailed information about your setup and the issue at hand, such as your platform (Mac or Win), exact versions of your OS, of Photoshop ("CS5" won't do for instance; we would need CS5 vers 12.0.2 or whatever) and of Bridge, machine specs, such as total installed RAM, scratch file HDs, video card specs, what troubleshooting steps you have taken so far, what error message(s) you receive, if having issues opening raw files also the exact camera make and model that generated them, etc., someone may be able to help you.
    A screen shot could be very helpful too.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • Mac connects then drops wireless connection after startup

    Hi, I have a strange problem.  I recently purchased a new MBP.  My old MBP didn't have any problems with the router, but my new one, after coming out of sleep, will be connected to the internet for a couple of seconds, then drop it like it's searching for a signal, then be connected for around 20 seconds but no actual internet connection. I know that it initially is connected because I can refresh the page or connect to a webpage for about 5 seconds, but then it starts "looking" for the signal.  And of course, once it finds the signal, it doesn't actually work for another 20 seconds.  I wanted to blame the router but no other computers have this problem.  Can anyone help me?

    If you are using W7 -- scrooge is correct - it is not listed on Linksys' W7 Comp. list - http://tinyurl.com/yd2nv5v  - but it is listed on Microsoft's Comp. list -  http://tinyurl.com/y9vuwdm - confusing!!
       FYI - I'm using a #320 router with the WUSB600N adaptor ( Win 7 driver - Ver.3.1.0.1.0 ) on a 64 bit platform desktop with no issues at all - I believe W7 found and loaded correct the driver for the 600 adp. --- or you can check for the correct driver for the adp. in the Device Manager if you decide to try the USB adp.'r

  • Hi - my mac mini drops the internet after 30 seconds. If i reset in the diagnosics it works again but then drops it just the same. Its connected to my home network. All other apple devices are fine?

    I have a home network which services:
    Apple TV
    Air port express
    Mac book pro
    I phone
    All the above wrok perfectly.
    I have a mac Mini which will join the network and operates fine but keeps dropping the internet after 30 secods of connection?
    If I reset everything in the diagnostics box it will rejoin the network but then drops it again !!!
    any ideas?
    Chris

    Hi Chris, this has worked for a few...
    Make a New Location, Using network locations in Mac OS X ...
    http://support.apple.com/kb/HT2712
    10.5, 10.6, 10.7 & 10.8…
    System Preferences>Network, top of window>Locations>Edit Locations, little plus icon, give it a name.
    10.5.x/10.6.x/10.7.x/10.8.x instructions...
    System Preferences>Network, click on the little gear at the bottom next to the + & - icons, (unlock lock first if locked), choose Set Service Order.
    The interface that connects to the Internet should be dragged to the top of the list.
    If using Wifi/Airport...
    Instead of joining your Network from the list, click the WiFi icon at the top, and click join other network. Fill in everything as needed.

  • My iphone 4S made a humming sound then dropped my call..now my calls last a few second before being dropped.

    My iphone 4S made a humming sound then dropped my call..now my calls last a few second before being dropped. What is the reason?

    Thank you very much guys.  Looking back on how I ended up in this situation in the first place,  I started by google searching "apple support",  clearly I was mistaken and ended up calling one of the google adverts instead of real apple support.  My wholehearted apology goes out to apple whom obviously did not answer my phone call.
    I belive that this is the advertised number that I called and the misleading ad that comes up when I google search apple support:
    Call For Apple Support1 (866) 691 7793
    apple.support.mytechhelp.com/
    Get Professional Tech Support. Call Now.
    Boy am I red in the face.  These people are masquerading as genuine apple support people when clearly they are not.  I think tonight I will call them back and simply scream vulgarities at them for as long as they stay on the line.
    A good lesson has been learned by me and hopefully anyone reading this.
    Get your support phone number from the apple website and not a google search. 
    Man do I feel dumb,  although I would feel a lot dumber if I had bought into the pile of garbage these people were trying to feed me.
    Apple I hope you litigate a cease and desist order on these people because they pretend to be the real deal.  They did not even try to correct me when I called them apple support, nor did they properly identify the company that they are truly representing.

  • HT201263 APP store indicates 1 update.  Press "store", "loading" briefly on screen then white screen with updates bar on top.  Press updates button in lower right; nothing happens frozen with white screen and still indication 1 update.  Other store featur

    APP store indicates 1 update.  Press "store", "loading" briefly on screen then white screen with updates bar on top.  Press updates button in lower right; nothing happens frozen with white screen and still indication 1 update.  Other store features and ipod work ok

    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Go to Settings>iTunes and App Stores and sign ut and sign back in
    - Reset all settings
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                 
    iOS: How to back up           
    - Restore to factory settings/new iOS device.
    If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
    Apple Retail Store - Genius Bar          
    Also see:
    https://discussions.apple.com/thread/4751197?tstart=0

  • Why is the battery percentage on my iPhone 4S on iOS7 freezing then dropping in big 10/20% chunks?

    Since upgrading to iOS7 my 4s has been having issues with battery meter. Take today for instance, it fell steadily to 59% then dropped instantly to 39% (I was not using any apps at the time). It has now been stuck on 32% for over half an hour, I've taken photos, used YouTube and other apps in an attempt to drain it but no change.
    I've turned off all unnecessary processes, including location services and background refresh to eliminate drain. System status meter shows processor operating at 10% when no apps open so it doesn't look like background processes are draining.
    I can't rely on the battery meter when it isn't accurate, it could suddenly drop to 5% or similar without warning.
    Is anyone else having these problems?  Any ideas Apple?
    It's going to render my phone untrustworthy and inaccurate.

    Hi!
    I am having similar issue.
    I have upgraded my iPhone 4s to the new iOS 7 and since then my battery indicator is stucked at 44%. Now regardless how much I charge or how much I use, it is showing the same battery level.
    Although this get refreshed when I restart the iPhone and it shows the current battery level and then again stucks at the same percentage. This was working fine on iOS 6.1.3, but is showing issues after the upgrade.
    I have tried to restore it, reset settings by selecting Erase All Content and Settings, hard reset (power+home button for 10 sec) but still no good, it shows the same level of battery percentage at which it is since last reboot.
    Although I was having iOS 6.1.3 ispw so I downgraded it again as Apple was signing iOS 6.1.3 at that time. Now the battery percentage is working fine. Therefore its not a hardware issue for sure and is just some bug with iOS 7.
    Now I have again upgraded to iOS 7.0.3, and I am facing the same issue again. And now I can't even downgrade to iOS 6.1.3.
    If you get some tips on how to solve this, then please share the same.

  • 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.

  • I just bought the new MacBook Air a few days ago and my Internet connection is so slow. My iPhone's connection works fine when connected to the wifi but the MacBook connects for a few seconds then drops completely. What do I do?

    I just bought the new MacBook Air a few days ago and my Internet connection is so slow. My iPhone's connection works fine when connected to the wifi but the MacBook connects for a few seconds then drops completely. What do I do? I tried connecting it to my phone's hotspot and it works perfectly. I'm a new Mac user so I have no idea what to do. I have Comcast xfinity cable and Internet. Thanks for the help.

    Your warranty includes 90 days of phone support. Contact Apple.

Maybe you are looking for

  • HT3819 How do you transfer purchased music from one apple id to another?

    I have a different Apple ID on my ipad than my macbook and macbook pro, I have most music on the macbooks but some on ipad how do I combine? This happend because when I was at the apple store buying my ipad I could not remember my other ID, so we mad

  • NWDI in three system landsacpe

    Hi 1. I had Portal Dev system where central NWDI & central SLD was configured with template installer, developers were doing initial developements 2. Now I have installed the Portal Quality system, I Just registered with the central SLD of Portal Dev

  • "Select Options" in WD view

    Hi to all, I have a WD View with some fields that I use as parameters in a BAPI and it works fine. Now I prefer to use thouse fields like "ABAP select options" and so "more than", "less than", "not equal to" and so on. How is it possible in a WD appl

  • Error on upload file (User has no access to upload files) [jdev 11.1.1.3]

    Hello to all, I wrote this simple servlet: import weblogic.management.servlet.MultipartRequest; public class SaveImage extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletExcept

  • Big problem with photoshop cc

    I have a problem with photoshop that had happened to me last year and I managed to sort by formatting my computer and came back this year. I was drawing on the software, when it suddenly closed. I then reopened the software, and there, my brush appea