Window Size, Resizing, "Zoom"

I have a question about Safari's windows. I have found, in comparison to Firefox, it difficult to use the resize or "zoom" function of the window options (the red, orange and green bubbles at the top left of every Macintosh window). Specifically, when I select the auto-resize (green button), I get a variety of window sizes which are meaningless to me, and I would like, as in Firefox, for the window to either maximize the screen, or return to some smaller (manually-set) size of previous.
My question for the group would be: has anyone found this to be problematic for them, or has anyone found a work-around or solution to this?

Hello,
I just noticed that this isn't working for me in Safari or Camino. The 'zoom' button works as it should in Opera and Firefox.
I tried your suggestion Hawaiian_Starman and it always reverts back. Just makes the window smaller than I want and clicking again just moves the same small window lower on the desktop. It will work as you say, but only for that one time. With Camino it reopens new window at whatever size another one is at. Hard to try completely without losing this page.
I just upgraded to 10.5.8 yesterday and have had other oddities afterward but this is the most annoying. Not sure if it was like that before, but apparently it was according to the original poster.
Haven't found this issue elsewhere, so I will call Apple tomorrow and report back if it gets resolved.
Thanks

Similar Messages

  • Why is CS6 Zoom change window size is different then previous versions?

    Why in CS6 when zoom changes window size and a folating window fits in Photoshop window or on other display screen do I get scroll bars where a select all selection marching ants are not visible on all four sides till I drag out the window to get rid of the scroll bars so I can see all of marching ants.  In preious versions of Photoshop space for scroll bars is present but there are no scrool bar, select all marching ants are visible on all four sides when an image's window fits in Photoshop window or on second display. Is there a way to make CS6 work like previous versions? Also if I just open a document and Photoshop fits it to Photoshop window or second display the floating window is correct without scroll bars. Zoon add then even when not needed....

    Without manually resizing each open document window on my Mac, Photoshop 13.x would be simply unusable.
    I hadn't posted anything on the subject because the system on which I run Ps 13.0.1 is based on a laptop (MacBook) literally rescued from the trash and with minimal specs.  The graphics card is not even involved in processing.
    I put up with it because I'm basically using it to run ACR 7.2RC1, then bring the converted and ACR-adjusted onto my regular working machine running CS4.
    In a nutshell, nothing will make the window fit the main monitor, not Fit To Window, nor 100% view, nor any shortcut.
    I need to drag the window manually from the lower right-hand corner in order for it to fit the monitor.  Otherwise, there are substantial gaps on the right and at the bottom.  I never run in tab view.
    For the sake of thoroughness:
    2007, 2GHz MacBook 2,1, Intel Core 2 Duo, 4 GB of RAM (can use 3 GB), 160 GB internal boot disk, dedicated FireWire400 external HD for Ps scratch disk, external Time Machine HD.  Dual external monitors + built-in laptop screen Snow Leopard 10.6.8.
    The Mac-Intel is used for no other purpose than running ACR 7.2RC1 and the only other application I occasionally run on said Mac-Intel is TextEdit.
    My main working machine is a Power Mac (PPC) G5 Quad with 16 GB of RAM, on which 11.0.2 is the last version of Photoshop to run, so I have the Mac-Intel system described above just to run ACR 7.x under Photoshop 13.0.1.  I convert my raw files in ACR7.x open them in Ps 13.0.x and save them via Ethernet to an external HD connected to the G5 Quad for further processing in CS4.
    2.5 GHz Power Mac (PPC) G5-Quad; 16GB RAM; mutant, flashed 550MHz nVidia GeForce 7800GTX 1,700MHz 512MB VRAM; ATTO ExpressPCI UL5D LP SCSI card; Mac OS X Tiger 10.4.11 and Leopard 10.5.8 boot drives; intrusive Spotblight, Dashboard and Time Machine permanently disabled; dual 22" CRT monitors; USB wireless 'n' available but connected to the Internet via wired Ethernet; FW flatbed scanner; 2 SCSI scanners (one tabloid-size transparency scanner and a film scanner); various internal & external HDs; FW Epson 2200 and Ethernet Samsung ML-2850ND printers; 2 X Back-UPS RS 1500 XS units.

  • Way to stop window from resizing when zooming?

    Hi there.
    Is there a way to stop the window from resiging when zooming in/out of my Photoshop documents?
    What seems to happen to me, like, hundreds of times a day is the window keeps resizing when I zoom in and out and much of it goes behind all my palettes. So I drag the resize handle to shrink the window only to have it resize again the next time I zoom in or out.
    I couldn't find a preference for this. When I used to work in Photoshop for WIndows I could have sworn that the window never changed size unless I specifically resized it...
    Thanks!

    Son-of-a-b....
    I swear I looked there a number of times... I swear.
    Thanks.

  • QuickLook - Window Size/Zoom

    Hello all !
    I was wondering, if there is a way to set the default windows size of quicklook. I usually open PDF files and on my PBG4 15" the window, that is opened, is pretty small so i have to resize it to get a better look on my pdf.
    I there a way? Any ideas?
    Thank you in advance!
    Best regards from Vienna, AUT
    qbitskey

    I looked around and there doesn't seem to be any way to set preferences for QuickLook at all. You can't even change the keystroke that activates it, or even disable it! You might be able to find or write a plugin that gives you more in-window options specifically for PDF files, but if not, I guess we'll just have to wait for Apple to allow better customization.

  • How do I resize my screen? I cant see the control f menu or the bottom of web pages unless I "restore down" to a smaller window size.

    I cant see the control f menu or the bottom of web pages unless I "restore down" to a smaller window size.

    The problem is when you maximize the window -- it is even bigger than the area available? Or the problem is that normal windows are always too large and have to be resized manually?

  • Missing zoom function - Zoom image to fit window size?

    Hi
    Can anyone tell me if it's possible to zoom the image so it fits the current document window size? (Not Fit-To-Screen, as this will change the doc window size)
    Thanks
    Steve

    I don't think there is a button per se for this like there is for Fit to Screen, but can use any of the numerous zoom functions to make the document fit inside the document window.

  • Set custom default window size for opening Preview?

    I'm using a terminal-based text editor, and when I compile LaTeX files, I have a script to open the compiled pdf in Preview. The trouble is that Preview opens in the same default dimensions every time, which covers up other applications I have open.
    It's not a huge deal, but it would be nice to have Preview open flushed right and as half the width of the screen every time. Since I'm opening and closing it so often, moving it and resizing it every time gets really annoying.
    I realize this isn't a built-in option for Preview, but is there any way of doing it using Terminal or otherwise? I've googled around and haven't found any satisfactory answers yet.
    Thanks!

    Hi zazi,
    Each window opened takes the size of the previous window opened.
    Its possible to zoom in and out as well [https://support.mozilla.org/en-US/kb/font-size-and-zoom-increase-size-of-web-pages]
    Also see:
    [https://support.mozilla.org/en-US/kb/changes-toolbars-and-window-sizes-are-not-saved]
    You can look at this extension to adjust the font size for the user interface.
    Theme Font & Size Changer: https://addons.mozilla.org/firefox/addon/theme-font-size-changer

  • How can I customize the window size of the PDF viewer?

    Hi
    Every time I open a PDF invoice in the built in PDF viewer - in Firefox Mac - I have to resize the the window and zoom the page to see what's on it. Is there a way to set a default window size that suits me better?

    You can vote for this bug to show your interest in getting this enhancement:
    *Bug 845946 - pdf.js does not remember zoom mode
    <i>(please do not comment in bug reports: [https://bugzilla.mozilla.org/page.cgi?id=etiquette.html])</i>

  • Block websites from detecting window size

    It seems that many websites are able to detect the size of the browser window. This creates two major problems for me:
    1. If I resize the window smaller than some unknown threshold width, the site switches to a mobile version.
    2. If I resize the window beyond a certain dimension, video sites like Youtube will shrink the size of the video player to some proportionally smaller size.
    I have a 42-inch monitor, so I like to work with multiple windows open at the same time, in non-overlapping positions. I might want to watch a video in a window perfectly resized to the dimensions of the video player plug-in only, in the corner of my screen, while working on a Word document side-by-side with a webpage and an Excel spreadsheet. I like to resize things in tall, narrow dimensions because this is what documents look like in real life and it minimizes vertical scrolling.
    How can I either block websites from detecting my browser window dimensions or pass a phony value to them so they display the full-size page (including larger sizes of media players) no matter what size I actually make the windows? I'd prefer to do this in the about:config rather than installing an add-on.
    Why do web designers put so much effort into avoiding scrollbars?!?! Is it so that we have to look at their stupid ads and banners along the margins of the real content?

    ''jscher2000 [[#answer-716231|said]]''
    <blockquote>
    I don't know of a way to override that and report a higher value without actually changing the zoom level of the page to make the text smaller. Hmm...
    </blockquote>
    And that's precisely what I want to do. How many different ways can a website query the user's screen size? (JS, CSS, etc.) If the list of methods is short enough, is there a way that I could block those specific methods, or better yet force a return value of my choosing? I don't know anything about user stylesheets, but based on some casual research I suspect that I can stop CSS-based queries by creating my own user stylesheet.
    I suppose an extreme measure is to block those scripts entirely, but that would break a lot of websites these days.

  • How  to change default window size?

    I'm using MX 6.0 on Mac... For some reason I can't figure out
    how to change the default window size in the work windows. Every
    time I open a new file to work on it opens to a smaller size than
    the actual page is. When opening pages dozens of times a day, it
    gets annoying to have to resize each time. I'm sure it wasn't
    always like this, but I can't figure out how to change it so the
    default size that it opens to each time is larger.
    Thanks for any help,
    DD

    Window | Workspace | Save Current
    This gives you the opportunity to save a current layout look
    that you like
    You might also look under
    Edit |Preferences | Status bar - but I don't see that this
    does anything
    in DWCS3

  • How do I set the Launch window size (from launch from an LMS) in Captivate 5.5?

    When my project launches from the LMS, the lauch window is smaller that the actual project size and requires the user to resize the window to see the whole project. My LMS administrator tells me that the launch window size is not controlled by the LMS so I am trying to figure out how I can set this to match the project dimensions.

    The size of the browser window CAN be controlled by the LMS, but some LMSs are hopeless in this area and don't provide the settings to do so.
    Moodle for example allows you to specify that the course content will open in a new window each time an item in the LMS TOC is clicked and what the height and width of that window will be. However, all versions of SumTotal before the latest one did not give you this option (and that despite the exhorbitant price difference between these two products.)
    So your LMS admin might be correct in that HIS particular LMS cannot control the size of the launch window, but that's not because no LMS can do this.

  • How can I adjust event window size while in day view on ical?

    How can I adjust the all-day event window size while in day view on ical?  I have thee all-day events, but they're just a little too big to simultaneously appear without having to scroll up/down the all-day event section.

    {Ctrl + Scroll wheel} does a Page Zoom and that setting is saved domain by domain.
    '''View > Zoom > Reset''' while you're viewing one of those zoomed-out pages in the SmartZone.
    https://support.mozilla.com/en-US/kb/Page+Zoom

  • 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();
    }

  • Set target window size

    Hello
    How do I set the target window size (say to 300 x 300px) when
    using 'getURL' to open an HTML page. I have tried resizing the
    target page on load in dreamweaver with no success.
    Thanks

    russell van gravy wrote:
    > Hello
    > How do I set the target window size (say to 300 x 300px)
    when using 'getURL' to open an HTML page. I have tried resizing the
    target page on load in dreamweaver with no success.
    > Thanks
    hi there
    we done that subject literally hundreds of time. Please check
    the forum archives
    before posting, there hardly are any new questions you could
    have which have not been
    documented here :)
    best place to search :
    http://groups.google.com/advanced_group_search?q=group:macromedia.flash.*&hl=en&lr=&ie=UTF -8
    look for "pop up" in the "with all of the words"
    Regards
    Urami
    Happy New Year guys - all the best there is in the 2006 :)
    <urami>
    http://www.Flashfugitive.com
    </urami>
    <web junk free>
    http://www.firefox.com
    </web junk free>

  • Window Size in Safari

    Is it possible to set a default window size when launching Safari and/or opening new windows in Safari?

    That is how I thought it worked.
    Please allow me to further expand on the issue I'm having and perhaps you can shed some light on that. 
    I resize the Safari window to the size I would like to be however when I open a radio streaming site I frequently use, which is a smaller window size by its default, it resets my window size and the next time I launch Safari and open a new window the window is the smaller default size not the size I set for it. The obvious solution would be to use a different web browser for the streaming site. I take it there is no way to set Safari to open a window at a certain size to prevent this from happening? 

Maybe you are looking for

  • Gifs will not open or save in photoshop cc

    I have been dealing with this problem for a month now, everytime I try to upload a gif, it says "could not complete Video Frames to layers because the file could not be opened." When I make a gif out of layers, it will only save as a jpg. What is wro

  • Smartform problem with field in table

    Hi everyone, I have  a strange issue. I created a table within a smartform. That table has a row with few fields. Somehow, value of field 5 appears in field 4 (near value of field 4). Of course, value of field 5 is meant to be displayed in its own co

  • Which Mac Mini

    I think that a Mac Mini may be best for me.  On another thread I ID'd a system under $1000 that looks fine.  But, I have quesitons. Sometimes it may be best to buy a refurb, as there is no educational discount, etc. for a mini anyway.  I thought an i

  • Oracle Composer not listed in Component Palette

    I am building webcenter portal application with runtime editing capabilities. I could not see Oracle Composer tag lib in the Component Palette. I have checked that the Oracle Composer jar has been included in the Portal project. Any clues what could

  • Question about Cisco Tec support Rep Live chat issue .

    Hello guys, I recently just tried to do a session of live tech support on cisco web site about a issue trying to get my router to change the speed of the wireless connection from 54mbps to the potiental maxium of 300mbps. Well This is my second time