Scrollbars with painting - why this doesn't work properly ?

Hello I written such a small program:
/* Test.java */
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class Test extends JFrame {
     private JPanel mainPanel;
     private InnerPanel innerPanel; // Panel w/ JScrollPane
     private JScrollPane scroll;
     private JButton addItem;
     public static final int WINDOW_WIDTH = 200;
     public static final int WINDOW_HEIGHT = 200;
     public Test () {
          buildPanel();
          add(mainPanel);
          setDefaultCloseOperation(EXIT_ON_CLOSE);
          setSize(WINDOW_WIDTH, WINDOW_HEIGHT);
          setVisible(true);
     public void buildPanel() {
          mainPanel = new JPanel(new BorderLayout());
          innerPanel = new InnerPanel();
          scroll = new JScrollPane(innerPanel);
          scroll.setPreferredSize(new Dimension(100, 100));
          addItem = new JButton("Add an item to JPanel");
          addItem.addActionListener(new ButtonListener());
          mainPanel.add(scroll, BorderLayout.CENTER);
          mainPanel.add(addItem, BorderLayout.PAGE_START);
     private class ButtonListener implements ActionListener {
          public void actionPerformed(ActionEvent e) {
               innerPanel.increase();
               innerPanel.revalidate();
               scroll.revalidate();
               scroll.getVerticalScrollBar().setValue(
                    (scroll.getVerticalScrollBar()).getMaximum());
     public static void main(String[] args) {
          Test test = new Test();
class InnerPanel extends JPanel {
     int x0 = 50, y0 = 50, x1 = 100, y1 = 50;
     public void paintComponent(Graphics g) {
          g.drawLine(x0,y0,x1,y1);
     public void increase() {
          x1 += 50;
          setPreferredSize(new Dimension(x1 + 100, y0));
          repaint();
}I click for example 5 times on the button and then move the scroll max to the right.
The end of the line should be already visible, but it's not. However it will be,
when you resize the frame just a bit.
Now when I try to move scroll max to the left but the beginning of the line doesn't show up. However it will , when you resize the frame just a bit.
Can anybody point where I made a mistake ?

Not sure I understand the description of the problem. I didn't notice any change in painting when I resized the frame, but anyway I made the following changes to help with the painting:
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class Test6 extends JFrame {
     private JPanel mainPanel;
     private InnerPanel innerPanel; // Panel w/ JScrollPane
     private JScrollPane scroll;
     private JButton addItem;
     public static final int WINDOW_WIDTH = 200;
     public static final int WINDOW_HEIGHT = 200;
     public Test6 () {
          buildPanel();
          getContentPane().add(mainPanel);
          setDefaultCloseOperation(EXIT_ON_CLOSE);
          setSize(WINDOW_WIDTH, WINDOW_HEIGHT);
          setVisible(true);
     public void buildPanel() {
          mainPanel = new JPanel(new BorderLayout());
          innerPanel = new InnerPanel();
          scroll = new JScrollPane(innerPanel);
          scroll.setPreferredSize(new Dimension(100, 100));
          addItem = new JButton("Add an item to JPanel");
          addItem.addActionListener(new ButtonListener());
          mainPanel.add(scroll, BorderLayout.CENTER);
          mainPanel.add(addItem, BorderLayout.PAGE_START);
     private class ButtonListener implements ActionListener {
          public void actionPerformed(ActionEvent e) {
               innerPanel.increase();
//               innerPanel.revalidate();
//               scroll.revalidate();
               scroll.getVerticalScrollBar().setValue(
                    (scroll.getVerticalScrollBar()).getMaximum());
     public static void main(String[] args) {
          Test6 test = new Test6();
class InnerPanel extends JPanel {
     int x0 = 50, y0 = 50, x1 = 100, y1 = 50;
     public void paintComponent(Graphics g) {
          super.paintComponent(g); // added
          g.drawLine(x0,y0,x1,y1);
     public void increase() {
          x1 += 50;
          setPreferredSize(new Dimension(x1 + 100, y0));
          revalidate();  // added
//          repaint();
}

Similar Messages

  • Confused as to why this doesn't work...

    I wrote this code correctly, but it doesn't seem to work. I'm not sure if I'm leaving something out or not using something correctly. If anyone can tell me why this doesn't work, it would be greatly appreciated!
    P.S. in the actionPerformed method, I want to put the window to close once someone clicks an "ok" button. How is this done? I've tried using setDefaultCloseOperation(3), but it doesn't seem to work.
    peace,
    Mark
    //?2002 Copyright. MJA Technologies.  All Rights Reserved.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class About extends JFrame implements ActionListener
        JTextArea textarea;
        JPanel panel1;
        JButton okbutton;
        String output;
        public About()
            super("Pages");
            Container container = getContentPane();
            textarea = new JTextArea();
            textarea.setText("Pages 1.0 beta 0\n?2002 MJA Technologies.\nAll Rights Reserved.");
            container.add(textarea);
            setDefaultCloseOperation( 3);
            setVisible(true);
            setSize(400, 300);
        public void actionPerformed(ActionEvent event)
            if(event.getSource() == okbutton)

    Oh see, you said this:
    "P.S. in the actionPerformed method, I want to put the window to close once someone clicks an "ok" button. How is this done? I've tried using setDefaultCloseOperation(3), but it doesn't seem to work."
    so I said this:
    "setVisible(false)"
    NOOOOOOOOOOOW you say the TextArea doesn't show up...that's a whole other problem.
    Jeeeeeeeeeeeeeeeez.
    So what layout manager are you using in the container? (hint hint)

  • Search in Outlook 2010 with Exchange Server 2010 doesn't work properly

    Hi all,
    I have a problem with a clients Exchange 2010. Search function in Outlook 2010 doesn't work properly, the employee can't search mails and contact - he doesn't get any result :-(
    In application syslog/protocol I get this error:
    Function  'CISearch::EcGetRowsetAndAccessor' found, content indexing for database  'Mailbox Database 0139257080' caused by MSSearch-Error '0x80041820' deactivated
    Can anybody help me with this, if its necessary I can give further information :-)
    Thomas
    Thomas Deinert

    Hi,
    What’s Exchange Version? Sometimes, after Installing Exchange 2010 SP 1, Searching via OWA or Outlook Online Mode may Fail. If so, please try the following solution:
    Download the script
    Repair-ExchangeSearchSymlinks.ps1 from the Script Center.
    Copy the Repair-ExchangeSearchSymlinks.ps1 script to the Scripts directory on the Mailbox server (default installation is C:\Program Files\Microsoft\Exchange Server\v14\Scripts).
    On the afflicted Mailbox server, open the Exchange Management Shell by right-clicking the shortcut and selecting “Run as Administrator”.
    Within the Exchange Management Shell, navigate to the Exchange Scripts directory.
    Within the Exchange Management Shell, run the following script: .\Repair-ExchangeSearchSymlinks.ps1
    Within the Exchange Management Shell, run the following script (without the symbols [] and substitute the database name(s) for any databases you wish to reset: .\ResetSearchIndex.ps1 [-force] <dbname> [<dbname>]...
    You will receive an Event ID 109 when the rebuilding of the index starts for each database and an Event ID 110 for each database when the index rebuild has completed.
    After receiving Event ID 110 for each database, test to make sure search functions correctly with both OWA and Outlook operating in Online Mode.
    Similar thread:
    https://social.technet.microsoft.com/Forums/exchange/en-US/35db030c-277f-49d6-83d6-772f839a47f8/owa-2010-sp1-search-problems?forum=exchange2010
    Best Regards.

  • Why Hotmail Doesn't Work Properly Anymore???

    Hotmail recently upgraded their look and as a result, it doesn't work properly via my iphone when I use Safari. It tells me to upgrade my web browser to Safari, IE or Firefox, however my iphone has the newest upgrade available...........so what is the fix?
    In short, my hotmail doesn't work properly (Doesn't display emails in the preview pane) so I can't check emails essentially.

    See the post abut this that you posted in a few minutes ago. Allan has answered the question.
    http://discussions.apple.com/thread.jspa?threadID=1786751&tstart=0

  • Not sure why this didn't work properly.

    So I programmed out a clock for practice/educational value for myself, and I got it near the end and encountered a problem. My program has 2 sets of class fields and a few temporary ones. The first set of class fields are text fields (hours, mins, secs) and the second set are Integers (h, m, s) (not int's ... Integers). I have two methods (setText and setTime) that convert between these two sets. setText sets the text fields to whatever time is stored in the Integers, and setTime sets the Integer values to whatever is stored in the text fields (assuming they're valid ints, of course).
    The code that was behaving strangely is shown below between the large comment lines. I needed some way to update the time, so I first tried changing the Integer values and then calling setText() ... but it didn't work. So I then tried setting the text fields and calling setTime() and that DID work. The end result of both should be the same, and yet it wasn't. I was wondering why not? Can anyone help/explain?
    I figure it has something to do with Integers and mutability, but that doesn't seem likely since they're both declared at the class-level and not within a method. I did some debugging of it (added System.out.println messages) and found out that the Integer value was changing, but then it was being reset back to what it was initially. bleh - I think I'm doing a bad job of explaining it. Anyway - here's the entire code below. It works correctly currently. But I left the bit of code in that wasn't working properly - just commented out. If you uncomment those and comment the 4 lines above them, you'll hopefully see what I'm talking about.
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.geom.Ellipse2D;
    import java.awt.geom.Line2D;
    import java.util.Calendar;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JTextField;
    import javax.swing.Timer;
    import javax.swing.event.DocumentEvent;
    import javax.swing.event.DocumentListener;
    // Math.sin, Math.cos, Math.tan use RADIANS .. not degrees.
    // 0 rad/deg is at east and proceeds clockwise for increasing angle
    public class myClock extends JFrame implements ActionListener, DocumentListener
         JTextField hours;
         JTextField mins;
         JTextField secs;
         Calendar now;
         ClockPane clock = new ClockPane();
         JPanel textPane;
         Integer m; double mrad;
         Integer h; double hrad;
         Integer s; double srad;
         myClock()
              setSize(300,360);
              setResizable(false);
              setTitle("Clock!");
              // get starting time
              now = Calendar.getInstance();
              hours = new JTextField(String.valueOf(now.get(Calendar.HOUR)%12), 2);
              mins = new JTextField(String.valueOf(now.get(Calendar.MINUTE)), 2);
              secs = new JTextField(String.valueOf(now.get(Calendar.SECOND)), 2);
              setTime();
              // set the document listeners
              hours.getDocument().addDocumentListener(this);
              mins.getDocument().addDocumentListener(this);
              secs.getDocument().addDocumentListener(this);
              // create visual layout of frame
              textPane = createSouthPane();
              add(textPane, BorderLayout.SOUTH);
              add(clock, BorderLayout.CENTER);
              // start clock update timer - updates every second (1000 milliseconds)
              new Timer(1000, this).start();
         public static void main(String[] args)
              myClock app = new myClock();
              app.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              app.setVisible(true);
         class ClockPane extends JPanel
              public void paintComponent(Graphics g)
                   super.paintComponent(g);
                   Graphics2D g2 = (Graphics2D) g;
                   Dimension dim = getSize();
                   double midx = dim.width / 2;
                   double midy = dim.height / 2;
                   Ellipse2D e = new Ellipse2D.Double(midx - 140, midy - 140, 280, 280);
                   g2.draw(e);
                   srad = s.doubleValue() / 60 * 2 * Math.PI;
                   mrad = m.doubleValue() / 60 * 2 * Math.PI;
                   mrad = mrad + srad / 60;
                   hrad = h.doubleValue() / 12 * 2 * Math.PI;
                   hrad = hrad + mrad / 12 + srad / 720;
                   srad = srad - Math.PI / 2;
                   mrad = mrad - Math.PI / 2;
                   hrad = hrad - Math.PI / 2;
                   Line2D shand = new Line2D.Double(midx, midy, midx + (e.getWidth() / 2 - 10) * Math.cos(srad), midy + (e.getHeight() / 2 - 10) * Math.sin(srad));
                   Line2D mhand = new Line2D.Double(midx, midy, midx + (e.getWidth() / 2 - 10) * Math.cos(mrad), midy + (e.getHeight() / 2 - 10) * Math.sin(mrad));
                   Line2D hhand = new Line2D.Double(midx, midy, midx + (e.getWidth() / 2 - 40) * Math.cos(hrad), midy + (e.getHeight() / 2 - 40) * Math.sin(hrad));
                   g2.setPaint(Color.BLACK);
                   g2.draw(hhand);
                   g2.draw(mhand);
                   g2.setPaint(Color.RED);
                   g2.draw(shand);
         private JPanel createSouthPane()
              JPanel p = new JPanel();
              p.add(new JLabel("Hours:"));
              p.add(hours);
              p.add(new JLabel("Mins:"));
              p.add(mins);
              p.add(new JLabel("Secs:"));
              p.add(secs);
              return p;
         // sets the Integer values of h, m, s to what the text fields read
         private void setTime()
              h = new Integer(hours.getText());
              m = new Integer(mins.getText());
              s = new Integer(secs.getText());
         // sets the text fields hours, mins, secs to what the Integer values contain
         private void setText()
              hours.setText(String.valueOf(h.intValue()));
              mins.setText(String.valueOf(m.intValue()));
              secs.setText(String.valueOf(s.intValue()));
         // action listener for Timer
         public void actionPerformed(ActionEvent e)
              int ss = s.intValue();
              int mm = m.intValue();
              int hh = h.intValue();
              ss++;
              mm = mm + ss / 60;
              hh = hh + mm / 60;
              ss = ss % 60;
              mm = mm % 60;
              hh = hh % 12;
              hours.setText(String.valueOf(hh));
              mins.setText(String.valueOf(mm));
              secs.setText(String.valueOf(ss));
              setTime();
    //          s = new Integer(ss);
    //          m = new Integer(mm);
    //          h = new Integer(hh);
    //          setText();
              clock.repaint();
         // document listener for text fields
         public void changedUpdate(DocumentEvent e)
              if (mins.getText().equals("") || hours.getText().equals("") || secs.getText().equals("")) ;
              else
                   setTime();
                   clock.repaint();
         public void removeUpdate(DocumentEvent e)
              if (mins.getText().equals("") || hours.getText().equals("") || secs.getText().equals("")) ;
              else
                   setTime();
                   clock.repaint();
         public void insertUpdate(DocumentEvent e)
              if (mins.getText().equals("") || hours.getText().equals("") || secs.getText().equals("")) ;
              else
                   setTime();
                   clock.repaint();
    }

    What does reading the text fields have to do with
    setting the text fields? You can set their values to
    anything you want. Look up MVC, which stands for
    model-view-controller. The text fields should only be
    used to display information from the model, which is
    a Calendar. The controller is the timer which updates
    the view with data from the model every second. I think you need to re-read everything that I've said up to now...
    It started out the program WITHOUT a timer, where the user would type in some numbers in the text fields and the time the clock displayed would change to match what they typed in. I wanted to keep this behavior simply because I wanted to. I wasn't attempting to make an actual authentic clock. After I had the program working, then I wanted to enhance it so that it altered itself, as well as the user still being able to alter it. I suppose if I were going to program it again from scratch, I'd probably have the clock have some int's at the class level and use those to make the text fields and such. Anyway --- this program is not (and never has been) about keeping accurate time.
    Creating a new object once a second isn't a big deal.
    If you depend on the Timer frequency to keep time, it
    will eventually drift and be inaccurate. Getting the
    system time each update will prevent that. You're
    updating the view based on the model, then updating
    the model based on the view's values, then updating
    the model. It's a much cleaner design to separate
    those parts clearly. Since this is for your own
    education you ought to start using good design
    patterns. I know they drift apart. That's not what I was interested in. And, afaik, "good design patterns" come with experience ... which is something that takes time to build and something that I am gaining. I'm not looking for a critique of my code here - I'm looking for a simple answer of why one approach worked properly and one didn't.
    Can you be more desciptive than "behaving strangely"?
    What's happening?Did you read my original post?
    One approach -> change the int's first, then update the fields.
    another approach -> change the fields first, then update the int's.
    One worked, one didn't.

  • Ipod nano 1st generation with SW1.3.1  doesn´t work properly

    as a positive thinking person I followed the recomendations in iTunes 7.5.. and downloaded SW 1.3.1 on my 1st generation nano. The consequnce was that this dammed thing now frequently stops playing(every few minutes max. 15 min). It either jumps back to the main menue and I have to start the song again or it freezes and I have to boot ( middle + menue key) or it reboots by itself.
    Have gone through all the 5Rs and the online service, tried to send a message to service, but this was not available and the message was gone. I do not find an older SW version. After hours I am really pi...
    Had functional problems during warranty period. Sent it in with new SW it worked properly until last weekend......
    Can anyone help. Has anyone made similar experience?

    Hello Forum Users et al,
    I know this Updated Post follows shortly after my previous post, but I have a useful piece of info. that others may wish to check on.
    I have been using a video:  www.video.com/12348372 as my test case for which the video comes on and then proceeds to not work.  If I click on the "arrow" in the bottom left corner of the video, the video screen goes "black" and nothing happens immediately.  But, here is the important information.  If I wait, then the video reappears, but sounds alternately starts and stops.
    What I did for the last several hours was to minimize the email containing the video, and I noticed that the sound alternately came on and off.  But, after over two hours, the video started to play normally (total time for video is about 4 mins.)  When it gets to the end, the original "start arrow" appears.  I have repeatedly played this video after the two-hour period of erratic play, and it played normally.
    This event happened one time over a week ago when I was on "Live Chat" with Adobe FP.  I was reporting my problem with FP with Mang Son while I had the video minimized, and, embarrassingly, the video started to work normally!  What could I say?!  I told him essentially that it looked like it was working, and I closed it out.  However, after this, I closed the email containing the video and tried to open the video from scratch, again.  Once again, it started to play erratically, even though it mysteriously was playing normally while I was on "Live Chat".
    Users may want to use the video that I cited and see what happens.  It is still a mystery why the video won't work for hours and then all of a sudden start working.  I also had similar trouble with YouTube videos.
    Best regards,
    bookwilliam

  • Anyone know why this doesn't work?

    Hi,
    I am trying to work with layeredPane's, and I am having a bit trouble, Here is my modified code of a java tutorial:
    package org;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    * LayeredPaneDemo.java is a 1.4 application that requires
    * images/dukeWaveRed.gif.
    public class LayeredPaneDemo extends JPanel {
        private String[] layerStrings = { "Yellow (0)", "Magenta (1)",
                                          "Cyan (2)",   "Red (3)",
                                          "Green (4)" };
        private Color[] layerColors = { Color.yellow, Color.magenta,
                                        Color.cyan,   Color.red,
                                        Color.green };
         private Label[] layeredLabels = new Label[5];
        private JLayeredPane layeredPane;
        public LayeredPaneDemo()    {
            setLayout(new BoxLayout(this, BoxLayout.PAGE_AXIS));
            //Create and set up the layered pane.
            layeredPane = new JLayeredPane();
            layeredPane.setPreferredSize(new Dimension(300, 310));
              for (int i = 0; i < layerStrings.length; i++) {
                layeredLabels[i] = createColoredLabel(layerStrings, layerColors[i] );
         layeredLabels[i].addMouseListener(mouseListener);
         setupLayers();
    add(layeredPane);
         private MouseListener mouseListener = new MouseAdapter() {
              public void MouseClicked(MouseEvent e) {     System.err.println("clicked");
                   Label label = (Label) e.getSource();
                   label.setUp();
                   setupLayers();
                   layeredPane.validate();
                   layeredPane.repaint();
         private void setupLayers() {
    //This is the origin of the first label added.
    Point origin = new Point(10, 20);
    //This is the offset for computing the origin for the next label.
    int offset = 35;
              //Add several overlapping, colored labels to the layered pane
    //using absolute positioning/sizing.
              for(int x=0; x< layeredLabels.length; x++) {
                   Label label = layeredLabels[x];
         if(label.up) {
    origin.y += offset;
    label.setBounds(origin.x, origin.y, 100, 100);
    layeredPane.add(label, new Integer(x));
    origin.x += offset;
                   if(label.up) {
    origin.y -= offset;
    //Create and set up a colored label.
    private Label createColoredLabel(String text, Color color) {
    Label label = new Label(text);
    label.setVerticalAlignment(JLabel.TOP);
    label.setHorizontalAlignment(JLabel.CENTER);
    label.setOpaque(true);
    label.setBackground(color);
    label.setForeground(Color.black);
    label.setBorder(BorderFactory.createLineBorder(Color.black));
    return label;
    * Create the GUI and show it. For thread safety,
    * this method should be invoked from the
    * event-dispatching thread.
    private static void createAndShowGUI() {
    //Make sure we have nice window decorations.
    JFrame.setDefaultLookAndFeelDecorated(true);
    //Create and set up the window.
    JFrame frame = new JFrame("LayeredPaneDemo");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    //Create and set up the content pane.
    JComponent newContentPane = new LayeredPaneDemo();
    newContentPane.setOpaque(true); //content panes must be opaque
    frame.setContentPane(newContentPane);
    //Display the window.
    frame.pack();
    frame.setVisible(true);
    public static void main(String[] args) {
    //Schedule a job for the event-dispatching thread:
    //creating and showing this application's GUI.
    javax.swing.SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    createAndShowGUI();
         class Label extends JLabel {
              public boolean up = false;
              public Label(String text) {
                   super(text);
              public void setUp() { up = !up; }
    for some reason the mouse listener isn't responding, and i don't know why..
    Thats only part of my problem. When the mouse listener does respond, I want to only move one of the labels in the Y direction, and then re-paint everything...
    any ideas?

    public void MouseClicked(MouseEvent e) {     System.err.println("clicked");should be small m
    public void mouseClicked(MouseEvent e) {     System.err.println("clicked");                                                                                                                                                                                                                                                                                                                                                       

  • SELECT for update + WAIT: why this doesn't work?

    here is sample data:
    create table t1 (x number, y number);
    create table t2 (x number, y number);
    insert into t1 values(1,1);
    insert into t1 values(2,2);
    insert into t1 values(3,3);
    insert into t2 values(2,2);
    commit;
    session 1:
    update t1 set y = 20 where x = 2; -- do not commit here
    session 2:
    declare
      cursor c is ( select t1.rowid as t1rid, t2.x, t2.y
      from t1, t2
      where t1.x = t2.x ) for update wait 300;
      type c_t is table of c%rowtype;
      c_v c_t;
    begin
      open c;
      loop
        fetch c bulk collect into c_v;
        exit when c%notfound;
        forall i in 1..c_v.count
          update t1 set y = 40 where rowid = c_v(i).t1rid;
      end loop;
      close c;       
    end;now session 2 waits because the row is locked in session 1. do a rollback in session 1. session 2 continues but doesn't update a row. why?
    thank you

    943276 wrote:
    thanks!
    I followed your remarks and found this interesting article:
    http://www.oracle.com/technetwork/issue-archive/2008/08-mar/o28plsql-095155.html
    I have to re-read it again and give it a second thought but I grasped the idea. so, if there is no LIMIT clause this code should be OK, right?
    open c;
    fetch c bulk collect into c_v;
    forall i in 1..c_v.count
    update t1 set y = 40 where rowid = c_v(i).t1rid;
    close c; 
    You are absolutely right, now..
    while when I decide to process in "batches" this one should stay, right?
    open c;
    loop
    fetch c bulk collect into c_v limit 1000;
    exit when c_v.count = 0;
    forall i in 1..c_v.count
    update t1 set y = 40 where rowid = c_v(i).t1rid;
    end loop;
    close c; 
    This also looks fine.. (Hopefully, you are just learning..the samething can be done with a single UPDATE
    my concern is that I don't understand the way WAIT works when incorporated in above scenario. is it:
    a) delaying opening a cursor for declared time (max) or untill the lock can be placed on all rows? ORThis is what is happening..
    b) cursor opens anyway, it is bulk update which is waiting OR
    c) something else?
    could you please in a few words describe what is happening within the scenario above with two sessions?
    thank you

  • How do I save a photo after I have zoomed in on it?  I want to save the zoom-in as a new photo and can't work out why this doesn't work the same way saving a cropped image, or adjusted image does.  Thank you.

    How do I save an image after I have zoomed in on it?  I can't work out why I can't save a zoom-in the same way
    I can save a cropped image or an adjusted image. Thanks, Lily A.

    Hi Matt, thanks for your reply.  Have realised that Zoom in Iphoto is just  a viewing tool and not an editing tool.
    Was creating beautiful abstractions by zooming in and wanted to create a new image of the result.   Have since discovered that cropping after zooming takes me a little way to where I want to go but it isn't the same effect.  Will perhaps have to try to create it when actually shooting.  Am doing a photoshop course in February and maybe will learn a bit more then, too.  Am pretty much an amateur just finding my way.
    Thanks again,
    Best, Lily

  • Why this doesn't work?

    Hi,
    Is there anyone who could help me debug this piece?
    I only get '1' in the print statement -
    instead of an expected 'ab1'
    Thanks.
    int RESULT;
    String testOut = new String();
    String testIn1 = new String ("a");
    String testIn2 = new String ("b");
    RESULT = testingInOut(testOut, testIn1, testIn2);
    System.out.println("TESTOUT = "+ testOut +RESULT);
         public static int testingInOut(String OUT,
                        String IN1,
                        String IN2)
         OUT = IN1+IN2;
         return(1);
         }               -----------------------------------

    Hi,
    Is there anyone who could help me debug this piece?
    I only get '1' in the print statement -
    instead of an expected 'ab1'Java only passes by value. You are passing a reference called 'testOut'. That reference is copied (pass by value) when the method is called.
    In your method you create a new string and then assign it to the copy of the reference. And then you return. The copy is discarded. And you still use the original.

  • RV042 when using both WAN with same DNS servers doesn't work properly

    Hi there, I have a RV042 and upgraded it to the latest firmware available. The problem is the following:
    when I have on WAN1:
    PROVIDER A - MUNDIVOX
    IP: 200.201.190.202
    SM: 255.255.255.248
    GW: 200.201.190.201
    DNS1: 200.196.48.20
    DNS1: 200.196.48.21
    and on WAN2:
    PROVIDER B - TRINN
    IP: 189.113.129.230
    SM: 255.255.255.252
    GW: 189.113.129.229
    DNS1: 189.113.128.3
    DNS2: 189.113.128.2
    The load balance works fine and network redirection works fine I can route all trafic from ips 192.168.0.1 to 192.168.0.50 and specific protocols such as UDP on port 5060 for my SIP Phone for ips 192.168.0.101 to 192.168.0.120 works fine.
    The problem is when I change WAN1 to:
    PROVIDER A - TRINN
    IP: 189.113.132.2
    SM: 255.255.255.248
    GW: 189.113.132.1
    DNS1: 189.113.128.3
    DNS2: 189.113.128.2
    And Wan 2 I keep the same provider that would be the same as Provider for WAN1 now:
    PROVIDER B - TRINN
    IP: 189.113.129.230
    SM: 255.255.255.252
    GW: 189.113.129.229
    DNS1: 189.113.128.3
    DNS2: 189.113.128.2
    The load balace simply doesnt work, all the IPs in the range of 192.168.0.1 to 192.168.0.50 that should be using WAN1, uses WAN2, in fact, as far as I could see all my trafic goes with that configuration to WAN2 only, but if I remove the cable from WAN2, all trafic goes to WAN1, so, very strange... if I put back on WAN1 the MUNDIVOX provider from situation 1, everything gets back to the way it should be.
    If someone can help I would appreciate,
    Regards,
    Cristiano

    Dear Cristiano,
    Thank you for reaching the Small Business Support Community.
    It's been several days since you posted your inquiry with still no answer from any of the community members, very interesting situation you have here and unfortunately my only suggestion is to contact the Small Business Support Center to have a TAC engineer check this out;
    https://www.cisco.com/en/US/support/tsd_cisco_small_business_support_center_contacts.html
    I wish I could be a better help and please do not hesitate to reach me back if there is anything I may assist you with in the meantime.
    Kind regards,
    Jeffrey Rodriguez S. .:|:.:|:.
    Cisco Customer Support Engineer
    *Please rate the Post so other will know when an answer has been found.

  • The cable doesn't work properly when connected as data cable.

    Hi,
    I have recently encountered problem of the cable. The thing is that if i use it just for charging with the plug, it works fine. But when i wanna use it with computer (i.e., accessing itunes, etc) or with my car, it doesn't work properly, it keeps switching between charging and discharging very fast. I will appreciate your quick support!
    Regards,
    Farhan

    Just for all the people to know, I found out the solution. You have to mark the correct side of the charging cable which connects at inlet of the phone. Because this point acts as a chip when used as data cable or auxiliary use (car,etc). That's why it charges with the plug on any side. I don't know what's the frequency of it happening to iphone 5s users, because I bought it recently (iOS 7.1.1) Hope it helps to others in future.

  • ITunes genius mix doesn't work properly

    Hi everybody,
    On my late 2006 iMac with iTunes10 Genius Mix doesn't work properly.
    After having activated Genius iTunes generates a number of mixes with different music styles.
    When I scroll over the squares the play sign shows up, but only work for 1 of the 9 mixes when I click the play sign.
    Clicking on the other play signs in the other squares does not do anything.
    Does anybody know what is wrong here?
    Thanks!
    PT

    I now know what is causing the problem, at least for the singer in question, but I don't know how to overcome it. I now know that the problem started when I downloaded an MP3 album from Amazon. This album contains 25 songs sung by 25 singers, INCLUDING Annette Hanshaw,THE SINGER I'M INTERESTED IN AT THE MOMENT. So, when I do an iTunes' search for Annette Hanshaw, I get her, but I also get all the other singers on this album. This puzzles me. I've downloaded many entire albums, but I've never run into the unwanted linkages before. In other words, I want to keep all of the songs in the album I just downloded, but I only want Annette Hanshaw when I put her name in the SEARCH bar. Is there a way to do this?
    Are all the songs in all Amazon MP3 albums linked together in this way?

  • Is there a way of using IE7 with Mountain Lion? There used to be this facility using Safari "Develop" with Lion, but this doesn't seem to work with ML

    Is there a way of using IE7 with Mountain Lion? There used to be this facility using Safari "Develop" with Lion, but this doesn't seem to work with ML

    Thank you for this, and to Caleb.
    I've tried using Caleb's approach (which is the same as I used with Lion), but the programme doesn't respond now that I have installed Mountain Lion.
    My problem is that I do not want to use IE7 but that a programme I need regular access to will only allow IE7 and I've been told by the developers that it is too expensive to upgrade this programme to allow it to be used by other browsers.
    So, my puzzle remains the same. I could access IE7 and use the programme using Caleb's solution with Lion. I can't do the same with Mountain Lion. I do (I think!) understand your point about the programme requiring IE7 specifically, but if it worked on Lion, why isn't it working on Mountain Lion? Or was I just lucky before?
    I'll try mende1's approach, though I doubt I'm technical enough to virtualise anything!
    Thanks again. Any further thoughts welcome.

  • Opening files with Illustrator and photoshop doesn't work, i have to drag the files from finder in to the program. This problem appears after opening 4 a 5 files.

    Opening files with Illustrator and photoshop doesn't work, i have to drag the files from finder in to the program.
    This problem appears after opening 4 a 5 files, rebooting helps another 4 a 5 times and appears again.

    I'd recommend reposting in the Boot Camp forum, that is where the Boot Camp and Windows gurus hang out.
    Good luck.

Maybe you are looking for