Weird case involving NTLM, Windows XP and the portal

I have a very peculiar case here for a few users.
The users have in common that they are all using windows xp (and just migrated), though most other person (even ones using windows XP do not have the problem).
We have implemented SSO to the portal, and done this using IIS on the portal servers. In front of that we are using IBM edge loadbalancers.
From a troubled user perspective, when the he opens the browser against the portal, he gets the portal logon page with a message saying user authentication failed.
I've found out what happens behind the scene and why the portal fails, but I can't explain it thoroughly.
The user's browser reaches the portal.company.com address. IIS requests NTLM login and after a few packets, the browser sends the user's userprincipalname ([email protected]) via the NTLM login (i've documented this in the network traces from ethereal). That the browser sends the userprincipalname is the core of the problems, all other user's send the SAMaccountname. The portal reads the NTLM information and parses the userinformation (here the userprincipalname) However, we have configured our portal to use the SAMaccountname when authentication against AD, and therefore the login fails.
If I use an DNS alias for the portal.company.com addresse, say aliasportal.company.com (actually portal.company.com is an alias for aliasportal.company.com, but don't let that confuse you), the same client that sent userprincipalname earlier, now sends the SAMaccountname and therefore gets SSO (and goes through the loadbalancer). And if I try to access one of the portal servers directly (without going through the load balancer), it also sends SAMaccountname. So basically, there has to be something with the address portal.company.com that makes the user's browser to send the userprincipalname.
Also, this problem is not tied to the user's profile, because if he uses another pc, it works like a charm.
<b>If you have any idea at all what could have caused this, please do contribute.. No answers are stupid (in this case). I am especially looking for details to what causes IE to send userprincipalnames, and what causes it to send SAMaccountname.</b>
Network sniffing(some minor changes to hide information):
This is the NTLM packet which "wrongly" contains the userprincipalname.
No.     Time        Source                Destination           Protocol Info
     17 0.107258    xxxxx        xxxxxx        HTTP     GET /irj/servlet/prt/portal/prtroot/com.sap.portal.navigation.portallauncher.default HTTP/1.1, NTLMSSP_AUTH
Frame 17 (792 bytes on wire, 792 bytes captured)
Ethernet II, Src: 00:11:43:7d:52:94, Dst: 00:d0:05:04:8f:fc
Internet Protocol, Src Addr: xxxxxxxxx , Dst Addr: xxxxxxx
Transmission Control Protocol, Src Port: 2201 (2201), Dst Port: http (80), Seq: 403, Ack: 741, Len: 738
Hypertext Transfer Protocol
    GET /irj/servlet/prt/portal/prtroot/com.sap.portal.navigation.portallauncher.default HTTP/1.1\r\n
    Accept: /\r\n
    Accept-Language: da\r\n
    Accept-Encoding: gzip, deflate\r\n
    User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)\r\n
    Host: portal.company.com\r\n
    Connection: Keep-Alive\r\n
    Authorization: NTLM TlRMTVNTUAADAAAAGAAYAHoAAACkAKQAkgAAAAAAAABIAAAAIAAgAEgAAAASABIAaAAAAAAAAAA2AQAABYKIogUBKAoAAAAPZABqAHcAbABAAHMAdABhAHQAbwBpAGwALgBjAG8AbQBQAEMALQAzADkAMwA3ADEANAAjkf2i0gE5YfLWa6LaFWq/QOJVBMBK+X/0eZk41NRM7wDew37l6/jmAQE
        NTLMSSP
            NTLMSSP identifier: NTLMSSP
            NTLM Message Type: NTLMSSP_AUTH (0x00000003)
            Lan Manager Response: 2391FDA2D2013961F2D66BA2DA156ABF40E25504C04AF97F
            NTLM Response: F4799938D4D44CEF00DEC37EE5EBF8E60101000000000000...
            Domain name: NULL
            User name: [email protected]
            Host name: PC-393714
            Session Key: Empty
            Flags: 0xa2888205
    \r\n
And this is the packet against the dns alias which works
No.     Time        Source                Destination           Protocol Info
     17 0.103528    xxxxx          xxxxx         HTTP     GET /irj/servlet/prt/portal/prtroot/com.sap.portal.navigation.portallauncher.default HTTP/1.1, NTLMSSP_AUTH
Frame 17 (788 bytes on wire, 788 bytes captured)
Ethernet II, Src: 00:11:43:7d:52:94, Dst: 00:d0:05:04:8f:fc
Internet Protocol, Src Addr: xxxx, Dst Addr: xxxx
Transmission Control Protocol, Src Port: 1825 (1825), Dst Port: http (80), Seq: 403, Ack: 741, Len: 734
Hypertext Transfer Protocol
    GET /irj/servlet/prt/portal/prtroot/com.sap.portal.navigation.portallauncher.default HTTP/1.1\r\n
    Accept: /\r\n
    Accept-Language: da\r\n
    Accept-Encoding: gzip, deflate\r\n
    User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)\r\n
    Host: aliasportal.company.com\r\n
    Connection: Keep-Alive\r\n
    Authorization: NTLM TlRMTVNTUAADAAAAGAAYAHgAAACkAKQAkAAAABYAFgBIAAAACAAIAF4AAAASABIAZgAAAAAAAAA0AQAABYKIogUBKAoAAAAPUwBUAEEAVABPAEkATAAtAE4ARQBUAEQASgBXAEwAUABDAC0AMwA5ADMANwAxADQAyhO3U1uCz0jn55samc+TUJmnyefvp0tXQN0VMytYEG3YDADHwRicxwEBAAA
        NTLMSSP
            NTLMSSP identifier: NTLMSSP
            NTLM Message Type: NTLMSSP_AUTH (0x00000003)
            Lan Manager Response: CA13B7535B82CF48E7E79B1A99CF935099A7C9E7EFA74B57
            NTLM Response: 40DD15332B58106DD80C00C7C1189CC70101000000000000...
            Domain name: COMPANY-NET
            User name: DAPA
            Host name: PC-393714
            Session Key: Empty
            Flags: 0xa2888205
    \r\n
I'll be truely impressed if anyone solves this one!

Hi Dagfinn,
There are a few things I would check in the Internet explorer settings on the client, namely :
-The security zones (which addresses are in Intranet, Trusted sites, etc.)
-Check in the security settings if automatic logon with current username is enabled.
-Look if "Enable integrated Windows authentication" is enabled in the advanced settings.
Are you using Kerberos authentication? There's a long article on Microsoft's website about troubleshooting Kerberos errors which might give a few clues :
http://www.microsoft.com/technet/prodtechnol/windowsserver2003/technologies/security/tkerberr.mspx

Similar Messages

  • Fit the image to window width, window height and  the window size

    hi all
    here we wrote the code for "fit the image to window width, window height and the window size". we are facing some problems in it. and all these operations have to perform even after zooming operations are done.if the below code doesnt satisfy kindly provide appropriate code .
    thanks .
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.*;
    import java.awt.image.BufferedImage;
    import java.io.*;
    import javax.imageio.ImageIO;
    import javax.swing.*;
    import java.io.File;
    import javax.swing.filechooser.FileFilter;
    import java.awt.geom.*;
    public class DP extends JFrame implements ActionListener,
                                               MouseListener,
                                               MouseMotionListener {
        private final int PEN_OP = 1;
        private final int CLEAR_OP = 2;
        private int radius;
        private int radius1;
        private int mousex = 0;
        private int mousey = 0;
        private int prevx = 0;
        private int prevy = 0;
        private boolean initialFreeHand = true;
        private boolean initialLine = true;
        private boolean initialEraser = true;
        private int Orx = 0;
        private int Ory = 0;
        private int OrWidth = 0;
        private int OrHeight = 0;
        private int drawX = 0;
        private int drawY = 0;
        private int polyX = 0;
        private int polyY = 0;
        private int eraserLength = 5;
        private int udefRedValue = 255;
        private int udefGreenValue = 255;
        private int udefBlueValue = 255;
        private int opStatus = PEN_OP;
        private int colorStatus = 1;
        private double zoomPercentage=10;
        private Color mainColor = new Color(0, 0, 0);
        private Color xorColor = new Color(255, 255, 255);
        private Color userDefinedColor =
            new Color(udefRedValue, udefGreenValue,udefBlueValue);
        private JButton openButton = new JButton("open");
        private JButton closeButton = new JButton("close");
         private JButton zoominButton = new JButton("ZoomIn");
         private JButton zoomoutButton = new JButton("ZoomOut");
         private JButton zoomto100Button = new JButton("ZoomTo100");
         private JButton fwwButton = new JButton("Fit window width");
         private JButton fwhButton = new JButton("Fit window height");
         private JButton fwButton = new JButton("Fit the window");
        private JButton clearButton = new JButton("Clear");
        private JTextField colorStatusBar = new JTextField(20);
        private JTextField opStatusBar = new JTextField(20);
        private JTextField mouseStatusBar = new JTextField(10);
        private JPanel controlPanel = new JPanel(new GridLayout(18, 1, 0, 0));
        JToolBar jToolbar = new JToolBar();
        private Container container;
        private JScrollBar horizantalSlide=new JScrollBar();
        public BufferedImage image;
        BufferedImage bgImage;
    //    public ImageIcon icon=null;
        JFileChooser fileChooser;
        DrawPanel drawPanel = new DrawPanel(bgImage,zoomPercentage);
        public DP() {
            super("WhiteBoard");
            fileChooser = new JFileChooser(".");
            container = getContentPane();
            container.setBackground(Color.white);
            container.setLayout(new BorderLayout());
            container.add(jToolbar,BorderLayout.NORTH);
            container.add(horizantalSlide);
            jToolbar.add(openButton);
            jToolbar.add(closeButton);
              jToolbar.add(zoominButton);
              jToolbar.add(zoomoutButton);
              jToolbar.add(zoomto100Button);
              jToolbar.add(fwwButton);
              jToolbar.add(fwhButton);
              jToolbar.add(fwButton);
            jToolbar.add(clearButton);
            colorStatusBar.setEditable(false);
            opStatusBar.setEditable(false);
            mouseStatusBar.setEditable(false);
            controlPanel.setBackground(Color.white);
            drawPanel.setBackground(Color.white);
            container.add(controlPanel, "West");
            container.add(drawPanel, "Center");
            openButton.addActionListener(this);
            closeButton.addActionListener(this);
              zoominButton.addActionListener(this);
              zoomoutButton.addActionListener(this);
              zoomto100Button.addActionListener(this);
              fwwButton.addActionListener(this);
              fwhButton.addActionListener(this);
              fwButton.addActionListener(this);
            clearButton.addActionListener(this);
            drawPanel.addMouseMotionListener(this);
            drawPanel.addMouseListener(this);
            addMouseListener(this);
            addMouseMotionListener(this);
            opStatusBar.setText("FreeHand");
            colorStatusBar.setText("Black");
        public void actionPerformed(ActionEvent e) {
            if(e.getActionCommand().equals("open"))
                showDialog();
            if(e.getActionCommand().equals("close"))
                closeDialog();
              if(e.getActionCommand().equals("ZoomIn"))
                   drawPanel.zoom(1);
              if(e.getActionCommand().equals("ZoomOut"))
                   drawPanel.zoom(-1);
              if(e.getActionCommand().equals("ZoomTo100"))
                   drawPanel.zoom(+10);
              if(e.getActionCommand().equals("Fit window width"))
                   drawPanel.fitwindowwidth();
              if(e.getActionCommand().equals("Fit window height"))
                   drawPanel.fitwindowheight();
              if(e.getActionCommand().equals("Fit the window"))
                   drawPanel.fitthewindow();
            if (e.getActionCommand() == "Clear")
                opStatus = CLEAR_OP;
            switch (opStatus) {
                case CLEAR_OP:
                    clearPanel();
        private void showDialog() {
            if(fileChooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
                File file = fileChooser.getSelectedFile();
                try {
                    bgImage = ImageIO.read(file);
                } catch(IOException e) {
                    System.out.println("IO error: " + e.getMessage());
                clearPanel();
        private void closeDialog() {
            drawPanel.setVisible(false);
            drawPanel.repaint();
        public void clearPanel() {
            opStatusBar.setText("Clear");
            Graphics g = image.getGraphics();
            g.setColor(drawPanel.getBackground());
            g.fillRect(0, 0, drawPanel.getBounds().width, drawPanel.getBounds().height);
            if(bgImage != null)
                g.drawImage(bgImage, 0, 0, this);
            g.dispose();
            drawPanel.repaint();
        public boolean mouseHasMoved(MouseEvent e) {
            return (mousex != e.getX() || mousey != e.getY());
        public void setActualBoundry() {
            if (mousex < Orx || mousey < Ory) {
                if (mousex < Orx) {
                    OrWidth = Orx - mousex;
                    drawX = Orx - OrWidth;
                } else {
                    drawX = Orx;
                    OrWidth = mousex - Orx;
                if (mousey < Ory) {
                    OrHeight = Ory - mousey;
                    drawY = Ory - OrHeight;
                } else {
                    drawY = Ory;
                    OrHeight = mousey - Ory;
            } else {
                drawX = Orx;
                drawY = Ory;
                OrWidth = mousex - Orx;
                OrHeight = mousey - Ory;
        public void setGraphicalDefaults(MouseEvent e) {
            mousex = e.getX();
            mousey = e.getY();
            prevx = e.getX();
            prevy = e.getY();
            Orx = e.getX();
            Ory = e.getY();
            drawX = e.getX();
            drawY = e.getY();
            OrWidth = 0;
            OrHeight = 0;
        public void mouseDragged(MouseEvent e) {
            updateMouseCoordinates(e);
            switch (opStatus) {}
        public void mouseReleased(MouseEvent e) {
            updateMouseCoordinates(e);
            switch (opStatus) {}
        public void mouseEntered(MouseEvent e) {
            updateMouseCoordinates(e);
        public void updateMouseCoordinates(MouseEvent e) {
            String xCoor = "";
            String yCoor = "";
            if (e.getX() < 0)
                xCoor = "0";
            else {
                xCoor = String.valueOf(e.getX());
            if (e.getY() < 0)
                xCoor = "0";
            else {
                yCoor = String.valueOf(e.getY());
            mouseStatusBar.setText("x:" + xCoor + " y:" + yCoor);
        public void mouseClicked(MouseEvent e) { updateMouseCoordinates(e); }
        public void mouseExited(MouseEvent e) { updateMouseCoordinates(e); }
        public void mouseMoved(MouseEvent e) { updateMouseCoordinates(e); }
        public void mousePressed(MouseEvent e) { updateMouseCoordinates(e); }
        public static void main(String[] args) {
            DP wb = new DP();
            wb.setDefaultCloseOperation(EXIT_ON_CLOSE);
            wb.setSize(1024,740);
            wb.setVisible(true);
        private class DrawPanel extends JPanel {
            private double m_zoom = 1.0;
            private double m_zoomPercentage;
            private BufferedImage m_image;
            double theta = 0;
            double thetaInc = Math.PI/2;
            public DrawPanel(BufferedImage imageb,double zoomPercentage) {
                m_image = imageb;
                m_zoomPercentage = zoomPercentage / 100;
            protected void paintComponent(Graphics g) {
                Graphics2D g2d=(Graphics2D)g;
                if(image == null)
                    initImage();
                g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
                                     RenderingHints.VALUE_INTERPOLATION_BICUBIC);
                double x = (1.0 - m_zoom)*getWidth()/2.0;
                double y = (1.0 - m_zoom)*getHeight()/2.0;
                AffineTransform at = AffineTransform.getTranslateInstance(x, y);
                at.rotate(theta,m_zoom*getWidth()/2,m_zoom*getHeight()/2);
                at.scale(m_zoom, m_zoom);
                g2d.drawRenderedImage(image, at);
      public void zoom(int inc) {
            m_zoom += inc * m_zoomPercentage;
            repaint();
              public void fitwindowwidth()
                int w1=drawPanel.getWidth();
                int h1=drawPanel.getHeight();
                BufferedImage image2=image.getScaledInstance(w1,h1,Image.SCALE_DEFAULT);
                drawPanel.setPreferredSize(new java.awt.Dimension(100,image2.getImage().getHeight(null)));
               drawPanel.repaint();
              public void fitwindowheight()
           BufferedImage image2=image.getScaledInstance(500,680,1); 
           drawPanel.setImage(iicon);
           drawPanel.setPreferredSize(new java.awt.Dimension(100,image2.getImage().getHeight(null)));
           drawPanel.repaint();
              public void fitthewindow()
           BufferedImage image2=image.getScaledInstance(1000,680,1);
           drawPanel.setPreferredSize(new java.awt.Dimension(100,image2.getImage().getHeight(null)));
           drawPanel.repaint();
            private void initImage() {
                int w = getWidth();
                int h = getHeight();
                image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
                Graphics2D g2 = image.createGraphics();
                g2.setPaint(getBackground());
                g2.fillRect(0,0,w,h);
                g2.dispose();
    }

    thank you for giving reply.
    your code is very helpful to us.but i couldn't integrate it in my code.here's my code.
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.*;
    import java.awt.image.BufferedImage;
    import java.io.*;
    import javax.imageio.ImageIO;
    import javax.swing.*;
    import java.io.File;
    import javax.swing.filechooser.FileFilter;
    import java.awt.geom.*;
    public class IS extends JFrame implements ActionListener,
                                               MouseListener,
                                               MouseMotionListener {
        private final int PEN_OP = 1;
        private final int CLEAR_OP = 2;
         private     final int DISTORT = 3;
        private final int SCALE   = 4;
        private final int FIT     = 5;
        private final int FILL    = 6;
        int scaleMode = SCALE;
        private int radius;
        private int radius1;
        private int mousex = 0;
        private int mousey = 0;
        private int prevx = 0;
        private int prevy = 0;
        private boolean initialFreeHand = true;
        private boolean initialLine = true;
        private boolean initialEraser = true;
        private int Orx = 0;
        private int Ory = 0;
        private int OrWidth = 0;
        private int OrHeight = 0;
        private int drawX = 0;
        private int drawY = 0;
        private int polyX = 0;
        private int polyY = 0;
        private int eraserLength = 5;
        private int udefRedValue = 255;
        private int udefGreenValue = 255;
        private int udefBlueValue = 255;
        private int opStatus = PEN_OP;
        private int colorStatus = 1;
        private double zoomPercentage=10;
        private Color mainColor = new Color(0, 0, 0);
        private Color xorColor = new Color(255, 255, 255);
        private Color userDefinedColor =
            new Color(udefRedValue, udefGreenValue,udefBlueValue);
        private JButton openButton = new JButton("open");
        private JButton closeButton = new JButton("close");
         private JButton zoominButton = new JButton("ZoomIn");
         private JButton zoomoutButton = new JButton("ZoomOut");
         private JButton zoomto100Button = new JButton("ZoomTo100");
         private JButton fwwButton = new JButton("Fit window width");
         private JButton fwhButton = new JButton("Fit window height");
         private JButton fwButton = new JButton("Fit the window");
        private JButton clearButton = new JButton("Clear");
        private JTextField colorStatusBar = new JTextField(20);
        private JTextField opStatusBar = new JTextField(20);
        private JTextField mouseStatusBar = new JTextField(10);
        private JPanel controlPanel = new JPanel(new GridLayout(18, 1, 0, 0));
        JToolBar jToolbar = new JToolBar();
        private Container container;
        private JScrollBar horizantalSlide=new JScrollBar();
        public BufferedImage image;
        BufferedImage bgImage;
    //    public ImageIcon icon=null;
        JFileChooser fileChooser;
        DrawPanel drawPanel = new DrawPanel(bgImage,zoomPercentage);
        public IS() {
            super("WhiteBoard");
            fileChooser = new JFileChooser(".");
            container = getContentPane();
            container.setBackground(Color.white);
            container.setLayout(new BorderLayout());
            container.add(jToolbar,BorderLayout.NORTH);
            container.add(horizantalSlide);
            jToolbar.add(openButton);
            jToolbar.add(closeButton);
              jToolbar.add(zoominButton);
              jToolbar.add(zoomoutButton);
              jToolbar.add(zoomto100Button);
              jToolbar.add(fwwButton);
              jToolbar.add(fwhButton);
              jToolbar.add(fwButton);
            jToolbar.add(clearButton);
            colorStatusBar.setEditable(false);
            opStatusBar.setEditable(false);
            mouseStatusBar.setEditable(false);
            controlPanel.setBackground(Color.white);
            drawPanel.setBackground(Color.white);
            container.add(controlPanel, "West");
            container.add(drawPanel, "Center");
            openButton.addActionListener(this);
            closeButton.addActionListener(this);
              zoominButton.addActionListener(this);
              zoomoutButton.addActionListener(this);
              zoomto100Button.addActionListener(this);
              fwwButton.addActionListener(this);
              fwhButton.addActionListener(this);
              fwButton.addActionListener(this);
            clearButton.addActionListener(this);
            drawPanel.addMouseMotionListener(this);
            drawPanel.addMouseListener(this);
            addMouseListener(this);
            addMouseMotionListener(this);
            opStatusBar.setText("FreeHand");
            colorStatusBar.setText("Black");
        public void actionPerformed(ActionEvent e) {
            if(e.getActionCommand().equals("open"))
                showDialog();
            if(e.getActionCommand().equals("close"))
                closeDialog();
              if(e.getActionCommand().equals("ZoomIn"))
                   drawPanel.zoom(1);
              if(e.getActionCommand().equals("ZoomOut"))
                   drawPanel.zoom(-1);
              if(e.getActionCommand().equals("ZoomTo100"))
                   drawPanel.zoom(+10);
              if(e.getActionCommand().equals("Fit window width"))
                   //drawPanel.fitwindowwidth();
              drawPanel.scaleImage(0,0,0,0);
              if(e.getActionCommand().equals("Fit window height"))
              drawPanel.scaleImage(0,0,0,0);
              if(e.getActionCommand().equals("Fit the window"))
              drawPanel.scaleImage(0,0,0,0);
            if (e.getActionCommand() == "Clear")
                opStatus = CLEAR_OP;
            switch (opStatus) {
                case CLEAR_OP:
                    clearPanel();
        private void showDialog() {
            if(fileChooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
                File file = fileChooser.getSelectedFile();
                try {
                    bgImage = ImageIO.read(file);
                } catch(IOException e) {
                    System.out.println("IO error: " + e.getMessage());
                clearPanel();
        private void closeDialog() {
            drawPanel.setVisible(false);
            drawPanel.repaint();
        public void clearPanel() {
            opStatusBar.setText("Clear");
              int w = image.getWidth();
            int h = image.getHeight();
            Graphics g = image.getGraphics();
            g.setColor(drawPanel.getBackground());
            g.fillRect(0, 0, w, h);
            if(bgImage != null) {
                int x = (w - bgImage.getWidth())/2;
                int y = (h - bgImage.getHeight())/2;
                g.drawImage(bgImage, x, y, this);
            g.dispose();
            drawPanel.repaint();
        public boolean mouseHasMoved(MouseEvent e) {
            return (mousex != e.getX() || mousey != e.getY());
        public void setActualBoundry() {
            if (mousex < Orx || mousey < Ory) {
                if (mousex < Orx) {
                    OrWidth = Orx - mousex;
                    drawX = Orx - OrWidth;
                } else {
                    drawX = Orx;
                    OrWidth = mousex - Orx;
                if (mousey < Ory) {
                    OrHeight = Ory - mousey;
                    drawY = Ory - OrHeight;
                } else {
                    drawY = Ory;
                    OrHeight = mousey - Ory;
            } else {
                drawX = Orx;
                drawY = Ory;
                OrWidth = mousex - Orx;
                OrHeight = mousey - Ory;
        public void setGraphicalDefaults(MouseEvent e) {
            mousex = e.getX();
            mousey = e.getY();
            prevx = e.getX();
            prevy = e.getY();
            Orx = e.getX();
            Ory = e.getY();
            drawX = e.getX();
            drawY = e.getY();
            OrWidth = 0;
            OrHeight = 0;
        public void mouseDragged(MouseEvent e) {
            updateMouseCoordinates(e);
            switch (opStatus) {
        public void mouseReleased(MouseEvent e) {
            updateMouseCoordinates(e);
            switch (opStatus) {}
        public void mouseEntered(MouseEvent e) {
            updateMouseCoordinates(e);
        public void updateMouseCoordinates(MouseEvent e) {
            String xCoor = "";
            String yCoor = "";
            if (e.getX() < 0)
                xCoor = "0";
            else {
                xCoor = String.valueOf(e.getX());
            if (e.getY() < 0)
                xCoor = "0";
            else {
                yCoor = String.valueOf(e.getY());
            mouseStatusBar.setText("x:" + xCoor + " y:" + yCoor);
        public void mouseClicked(MouseEvent e) { updateMouseCoordinates(e); }
        public void mouseExited(MouseEvent e) { updateMouseCoordinates(e); }
        public void mouseMoved(MouseEvent e) { updateMouseCoordinates(e); }
        public void mousePressed(MouseEvent e) { updateMouseCoordinates(e); }
        public static void main(String[] args) {
            IS wb = new IS();
            wb.setDefaultCloseOperation(EXIT_ON_CLOSE);
            wb.setSize(1024,740);
            wb.setVisible(true);
        private class DrawPanel extends JPanel {
            private double m_zoom = 1.0;
            private double m_zoomPercentage;
            private BufferedImage m_image;
            double theta = 0;
            double thetaInc = Math.PI/2;
            public DrawPanel(BufferedImage imageb,double zoomPercentage) {
                m_image = imageb;
                m_zoomPercentage = zoomPercentage / 100;
            protected void paintComponent(Graphics g) {
                   super.paintComponent(g);
                Graphics2D g2d=(Graphics2D)g;
                if(image == null)
                    initImage();
                g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
                                     RenderingHints.VALUE_INTERPOLATION_BICUBIC);
                              int w = getWidth();
                    int h = getHeight();
                  int iw = image.getWidth();
                  int ih = image.getHeight();
                  if(scaleMode == SCALE) {
                double x = (w - m_zoom*iw)/2;
                double y = (h - m_zoom*ih)/2;
                AffineTransform at = AffineTransform.getTranslateInstance(x, y);
                at.rotate(theta,m_zoom*getWidth()/2,m_zoom*getHeight()/2);
                at.scale(m_zoom, m_zoom);
                g2d.drawRenderedImage(image, at);
                   else {
                scaleImage(w, h, iw, ih);
              private void scaleImage( int w, int h, int iw, int ih) {
                             Graphics2D g2d = image.createGraphics();
            double xScale = (double)w/iw;
            double yScale = (double)h/ih;
            AffineTransform at = new AffineTransform();
            if(scaleMode == DISTORT) {
                double x = (w - xScale*iw)/2;
                double y = (h - yScale*ih)/2;
                at.setToTranslation(x, y);
                at.scale(xScale, yScale);
            } else {
                double scale = (scaleMode == FIT) ? Math.min(xScale, yScale)
                                                  : Math.max(xScale, yScale);
                double x = (w - scale*iw)/2;
                double y = (h - scale*ih)/2;
                at.setToTranslation(x, y);
                at.scale(scale, scale);
            g2d.drawRenderedImage(image, at);
      public void zoom(int inc) {
            m_zoom += inc * m_zoomPercentage;
            repaint();
            private void initImage() {
                int w = getWidth();
                int h = getHeight();
                image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
                Graphics2D g2 = image.createGraphics();
                g2.setPaint(getBackground());
                g2.fillRect(0,0,w,h);
                g2.dispose();
    }

  • I am facing issues with my music on my iOS device. I have five devices connected to my apple id. And out of which a Windows Machine and iPhone is not able to sync the purchased songs on the the Windows machine and the iPhone.

    I am facing issues with my music on my iOS device. I have five devices connected to my apple id. And out of which a Windows Machine and iPhone is not able to sync the purchased songs on the the Windows machine and the iPhone. The iPhone4 shows the songs are not supported and on the Windows Machine the songs do not play completely. Can anyone advice what could have gone wrong ? Because rest of the devices are synced to MacBook and they are able to sync the content normally.  I have even subscribed to iTunes Match but the problem is still not fixed.

    Firstly...  a little Clarity...
    Devices refer to iDevices... iPod... iPhone... iPad. ..   Not Computers.
    Authoriation applies ONLY to Computers... of which there is a Limit of 5 per Apple ID.
    If the issue is with iTunes on your Windows Computer... Perhaps you need to Re-install iTunes...
    See Here... to Uninstall and Re-Install iTunes...
    http://www.apple.com/support/itunes/install/

  • I cannot connect to the iTunes Store.  I receive Error Code -1202.  This problem began yesterday.  I have been successfully connecting to the store for months on this PC.  I am running Windows 7 and the Windows Security Center.  Thanks for any help

    TS1368 I cannot connect to the iTunes Store.  I receive Error Code -1202.  This problem began yesterday.  I have been successfully connecting to the store for months on this PC.  I am running Windows 7 and the Windows Security Center.  Thanks for any help.

    Hello alankilner,
    And welcome to Apple Discussions!
    Using Proxy: Yes
    Try temporarily disabling this setting by following the steps outlined in this Apple support document.
    http://support.apple.com/kb/TS1490
    B-rock

  • I have a macbook pro. i have a photosmart 7510. we just bought a new windows tower and the printer works wireless for us, but now the mac does not print anymore wirelessly. i keep getting a message Network host 'HPE93F2A.local.' is busy. what can i do to

    I have a macbook pro. i have a photosmart 7510. we just bought a new windows tower and the printer works wireless for us, but now the mac does not print anymore wirelessly. i keep getting a message Network host 'HPE93F2A.local.' is busy. what can i do to

    it is a windows 8

  • Windows 7 and the W500

    Not sure what the latest info is with regards to Windows 7 and the W500 but today I reinserted my 160GB hard drive and installed Windows 7 Pro x64 (RTM) on it, I was surprised to see that everything except for the modem driver, figerprint, and audio driver would not install.
    That's right even the ATI driver installed with the control panel under Windows 7. Woohoo!
    I am not too worried about the fingerprint reader at this point as I noticed Windows 7 Pro detects the reader and I am able to use it without needing Lenovo's software.
    A.

    good to hear something positive about the W500 atlast D  I'm thinking of doing the same when I get my unit this week.  Any advice/words of caution/tips?    Does the unit come with a driver cd?  or is there a link online that I can find out?   thanks

  • Just transferred data to iMac from working Mac Pro that is using Parallels and Windows 7 and the Biblesoft 5  and it will not open on the iMac the only change is the my new iPhone number is  OS.  Any ideas?

    Just transferred data to iMac from working Mac Pro that is using Parallels and Windows 7 and the Biblesoft 5  and it will not open on the iMac the only change is the new Maverick OS from the macpro Lion OS.  Any ideas?
    <Personal Information Edited by Host>

    Setup Assistant and Migration Assistant do not restore MS Windows, it only does the OS X partition. All of your Windows stuff must be backed up and restore using a MS Windows application. If no one on this forum is able to answer your question then I'd repost it on a Parallels forum to see how other Windows users approach this.

  • I have Adobe Acrobat 9 Standard Serial No. and would like to upgrade to the Microsoft Windows 8 and the Office Professional Edition 2013.

    I have Adobe Acrobat 9 Standard [serial number removed by moderator] and would like to upgrade to the Microsoft Windows 8 and the Office Professional Edition 2013.

    Hi w james,
    As you mentioned that you are upgrading your Operating System to Windows 8 and MS Office to MS Office Professional 2013, please note that Adobe Acrobat 9 is not compatible with Windows 8 and MS Office 2013. You need to upgrade to Adobe Acrobat XI as it is fully compatible with Windows 8 and MS Office 2013.
    For more information, please refer:
    http://helpx.adobe.com/acrobat/kb/compatible-web-browsers-pdfmaker-applications.html
    http://www.adobe.com/products/acrobatpro/tech-specs.html

  • When i try to download 'Get album artwork' I receive error alert with (-609) I have tried to download the artwork on the advanced tab, but still no success. My computer runs Windows 7 and the alert appears in my itunes which on my computer.Can you assist?

    When i try to download 'Get album artwork' I receive error alert with (-609) I have tried to download the artwork on the advanced tab, but still no success. My computer runs Windows 7 and the alert appears in my itunes which on my computer.Can you assist?

    Perhaps try the "Error -609" section in the Specific Conditions and Alert Messages: (Mac OS X / Windows) section of the following document:
    iTunes: Advanced iTunes Store troubleshooting

  • Nokia Lumia 520(back,windows logo and the search b...

    May  I know if the lumia 520 (Back, Windows logo and the search buttons-on the front of the device) - does it have the white lights on lighted up when in dark places or it does not have any lights at all?
    I have tried reset the phone, change the brightness to auto and restart many times still no lights on those buttons.
    Please advise if there are other lumia 520 user out there and if there is any solutions or it does not have any lights at all.
    If there is any solutions for it, please do let me know. First time user for windows phone.
    Thanks in advanced.
    Solved!
    Go to Solution.

    Those buttons are not backlit on the 520. 

  • HT5639 I have downloaded Windows 8 on my Mac Pro 13'' retina display. The first few hours everything worked fine until I open windows today and the trackpad/mouse and keyboard aren't working. Ive tried resetting windows but it didnt work. help appreciated

    I have downloaded Windows 8 on my Mac Pro 13'' retina display. The first few hours everything worked fine until I open windows today and the trackpad/mouse and keyboard aren't working. Ive tried resetting windows but it didnt work. help appreciated thanks

    It sounds like it is time to restore from the backups you made just before making the disk changes.
    You can re-partition and restore your backups.  If you didn't make backups first (you were warned that it might damage things and to make sure you had a good backup) then you will need to repartition everything and reinstall from scratch...

  • HT1926 iTunes won't install everything it needs to run.  I remove it from my computer and reinstall it and it keeps saying it.  I am using Windows 7 and the latest update from iTunes.

    iTunes won't install everything it needs to run.  I remove it from my computer and reinstall it and it keeps saying it.  I am using Windows 7 and the latest update from iTunes.

    What does the error message say when you install iTunes and it fails?
    This post was edited by Malignance

  • Firefox freezes when i visit websites with videos on the background or i watch videos.I have windows 7 and the laatest version of mozilla.

    I have windows 7 and the latest version of firefox.When i watch videos on youtube or visit websites with videos on the background mozilla freezes. I tried to disable all the extensions and plugins but it had no result.I didn't had this problem with versions of mozilla previous to 4.

    I have had a similar problem with my system. I just recently (within a week of this post) built a brand new desktop. I installed Windows 7 64-bit Home and had a clean install, no problems. Using IE downloaded an anti-virus program, and then, because it was the latest version, downloaded and installed Firefox 4.0. As I began to search the internet for other programs to install after about maybe 10-15 minutes my computer crashes. Blank screen (yet monitor was still receiving a signal from computer) and completely frozen (couldn't even change the caps and num lock on keyboard). I thought I perhaps forgot to reboot after an update so I did a manual reboot and it started up fine.
    When ever I got on the internet (still using firefox) it would crash after anywhere between 5-15 minutes. Since I've had good experience with FF in the past I thought it must be either the drivers or a hardware problem. So in-between crashes I updated all the drivers. Still had the same problem. Took the computer to a friend who knows more about computers than I do, made sure all the drivers were updated, same problem. We thought that it might be a hardware problem (bad video card, chipset, overheating issues, etc.), but after my friend played around with my computer for a day he found that when he didn't start FF at all it worked fine, even after watching a movie, or going through a playlist on Youtube.
    At the time of this posting I'm going to try to uninstall FF 4.0 and download and install FF 3.6.16 which is currently on my laptop and works like a dream. Hopefully that will do the trick, because I love using FF and would hate to have to switch to another browser. Hopefully Mozilla will work out the kinks with FF 4 so I can continue to use it.
    I apologize for the lengthy post. Any feedback would be appreciated, but is not necessary. I will try and post back after I try FF 3.16.6.

  • When tring to download the download window appears and the bar moves across to complete but then the window closes and nothing is downloaded?

    # Question
    when tiring to download the download window appears and the bar moves across to complete but then the window closes and nothing is downloaded?

    Your plugins list shows outdated plugin(s) with known security and stability risks.
    *Shockwave Flash 10.0 r32
    Update the [[Flash]] plugin to the latest version.
    *http://www.adobe.com/software/flash/about/
    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.<br />
    Do not forget to re-enable the scanning in your anti-virus software after you are finished with downloading and installing.<br />
    See http://kb.mozillazine.org/Unable_to_save_or_download_files (Disable virus scanning in Firefox preferences - Windows)

  • How to deconfigure the windows configuration with the portals

    There is already configuration done b/w windows and the portals but now i have to deconfigure it.
    May i know the steps to do that.
    Thanks in advance.

    Hi Shreya
    Did you configure SSO between windows and portal using kerberos authentication?
    If so, Can you share how to achieve that task? Do you have any documents for that?
    I have already opened a thread for this.I have given that link below.
    regarding SSO between windows and portal
    Thanks & Regards,
    Yoga

Maybe you are looking for

  • Crying Real Tears bc of DynamicLink Error in Ps cs6 extended

    I've tried every single thing!! And i do mean every single thing..I only want to be able to edit gifs.. I've deleted the files in the user folder and the program files folder..still nothing..I've uninstalled and reinstalled..still nothing. The update

  • ITunes freezes downloading app updates

    I'm running 10.5 (141) on my iMac running Lion and am running into a problem where iTunes will constantly freeze when I download my app updates.  If I download updates individually, there doesn't seem to be a problem and if I turn off simultaneous do

  • Problem i'm facing while trying to open the form builder

    Hi all, I'm facing a small problem while i'm trying to open the form builder via Portal - content management - form builder, i.e., intially a dialogue box statting that : Applet(s) in this HTML page requires a version of java different from the one t

  • EAP-TLS Win2003 CA and IAS...not checking CRL?

    Hi I've got EAP-TLS setup and working using Win2003 CA and IAS as the RADIUS backend. I've issued certs to my wireless users, and now I want to revoke a certificate, so in the CA, I revoke the cert and then under Revoked Certs I click on publish...ye

  • MacBook Pro Closure Gap

    I've read other topics about issues with a warped display and gaps in the display. Well, I just wanted to check whether or not my new MacBook Pro is normal. I purchased the 17" model and when the lid is closed, there isn't a large gap, however, at th