Problem with a string method

Hello, I am working on a program that converts Roman numerals to Arabic numbers and the opposite. I have the Arabic to Roman part down, yet Roman to Arabic part is causing troubles for me.
I know that there are many solutions out there, yet I would like just solutions within my code that would fix the problem it has.
Instead of the whole code, here's the method that changes Roman to Arabic.
     //method to convert Roman numerals to Arabic numbers
     public static int toArabic (String x)
          int arabica=0;
          char chars;
          for (int y=0; y<=(x.length()-1); y++)
               chars=x.charAt(y);
               switch (chars)
                    case 'C':
                         if( x.length() == 1)
                              arabica+=100;
                              y++;
                         else if (x.charAt(y+1)=='M')
                              arabica+=900;
                              y++;
                         else if (x.charAt(y+1)=='D')
                              arabica+=400;
                              y++;
                         else
                              arabica+=100;
                         break;
                    case 'X':
                         if(x.length() == 1)
                              arabica+=10;
                              y++;
                         else if (x.charAt(y+1)=='C')
                              arabica+=90;
                              y++;
                         else if (x.charAt(y+1)=='L')
                              arabica+=40;
                              y++;
                         else
                              arabica+=10;
                         break;
                    case 'I':
                         if(x.length() == 1)
                              arabica+=1;
                              y++;
                         else if (x.charAt(y+1)=='X')
                              arabica+=9;
                              y++;
                         else if (x.charAt(y+1)=='V')
                              arabica+=4;
                              y++;
                         else
                              arabica++;
                         break;
                    case 'M':
                         arabica+=1000;
                         break;
                    case 'D':
                         arabica+=500;
                         break;
                    case 'L':
                         arabica+=50;
                         break;
                    case 'V':
                         arabica+=5;
                         break;
There's a problem with this, however, is that whenever I put something in like XX, CC, XXX, or II, the program says
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 2
at java.lang.String.charAt(String.java:687)
at RomanNumerals.toArabic(RomanNumerals.java:172)
at RomanNumerals.main(RomanNumerals.java:33)
I think this problem is caused by the if-else and else-if statements in my method for cases C, X, and I, as this problem doesn't come up when I do similar things to cases without the if statements. Could you perhaps find out what is causing this problem? I've been working on it for days after finishing the rest and I can't figure it out.
Thanks

import java.io.*;
public class RomanNumerals{
          public static void main (String [] args)
          DataInput keyboard=new DataInputStream (System.in);
          String input;
          try
               //options
               System.out.println("1. Roman numerals to Arabic numbers");
               System.out.println("2. Arabic numbers to Roman numerals");
               System.out.println("3. Exit");
               System.out.print("Enter your option: ");
               input=keyboard.readLine();
               int choice=Integer.parseInt(input);
               switch (choice)
                    //Roman numerals to Arabic numbers
                    case 1:
                         String romanInput, ro;
                         int answer1;
                         System.out.print("Enter a Roman numeral: ");
                         romanInput=keyboard.readLine();
                         ro=romanInput.toUpperCase();
                         answer1=toArabic(ro); //line 33 where the error occurs
                         System.out.println("The Arabic number is: "+answer1);
                         break;
                    //Arabic numbers to Roman numerals
                    case 2:
                         String arabicInput, answer;
                         System.out.print("Enter an Arabic number: ");
                         arabicInput=keyboard.readLine();
                         int arabic=Integer.parseInt(arabicInput);
                         answer=toRomans(arabic);
                         System.out.println("The Roman numeral is: "+answer);
                         break;
                    case 3:
                         break;
                    default:
                         System.out.println("Invalid option.");
          catch(IOException e)
               System.out.println("Error");
               //method to convert Arabic numbers to Roman numerals
     public static String toRomans (int N)
          String roman="";
          while (N>=1000)
               roman+="M";
               N-=1000;
          while (N>=900)
               roman+="CM";
               N-=900;
          while (N>=500)
               roman+="D";
               N-=500;
          while (N>=400)
               roman+="CD";
               N-=400;
          while (N>=100)
               roman+="C";
               N-=100;
          while (N>=90)
               roman+="XC";
               N-=90;
          while (N>=50)
               roman+="L";
               N-=50;
          while (N>=40)
               roman+="XL";
               N-=40;
          while (N>=10)
               roman+="X";
               N-=10;
          while (N>=9)
               roman+="IX";
               N-=9;
          while (N>=5)
               roman+="V";
               N-=5;
          while (N>=4)
               roman+="IV";
               N-=4;
          while (N>=1)
               roman+="I";
               N-=1;
          return(roman);
     //method to convert Roman numerals to Arabic numbers
     public static int toArabic (String x)
          int arabica=0;
          char chars;
          for (int y=0; y<=(x.length()-1); y++)
               chars=x.charAt(y);
               switch (chars)
                    case 'C':
                         if( x.length() == 1)
                              arabica+=100;
                              y++;
                         else if (x.charAt(y+1)=='M')
                              arabica+=900;
                              y++;
                         else if (x.charAt(y+1)=='D')
                              arabica+=400;
                              y++;
                         else
                              arabica+=100;
                         break;
                    case 'X':
                         if(x.length() == 1)
                              arabica+=10;
                              y++;
                         else if (x.charAt(y+1)=='C')   //the line 172 where error occurs
                              arabica+=90;
                              y++;
                         else if (x.charAt(y+1)=='L')
                              arabica+=40;
                              y++;
                         else
                              arabica+=10;
                         break;
                    case 'I':
                         if(x.length() == 1)
                              arabica+=1;
                              y++;
                         else if (x.charAt(y+1)=='X')
                              arabica+=9;
                              y++;
                         else if (x.charAt(y+1)=='V')
                              arabica+=4;
                              y++;
                         else
                              arabica++;
                         break;
                    case 'M':
                         arabica+=1000;
                         break;
                    case 'D':
                         arabica+=500;
                         break;
                    case 'L':
                         arabica+=50;
                         break;
                    case 'V':
                         arabica+=5;
                         break;
          return(arabica);
     }When I put in XX as the input, this is what the error comes out as:
Enter a Roman numeral: XX
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 2
    at java.lang.String.charAt(String.java:687)
    at RomanNumerals.toArabic(RomanNumerals.java:172)
    at RomanNumerals.main(RomanNumerals.java:33)

Similar Messages

  • Problem with output string to command

    hey i have no idea why this aint working
    its a simple output string to command.
    what it is supposed to do is make a new directory given by the input string
    e.g. mkdir /home/luke/dep
    thanks for the help
    //methods input save files
         saveFile = JOptionPane.showInputDialog("Save Files To : ");
         //method command for saving files
         //Stream to write file
         FileOutputStream fout;          
         try { Process myProcess = Runtime.getRuntime().exec("mkdir" + saveFile );
          InputStreamReader myIStreamReader = new InputStreamReader(myProcess.getInputStream());
          fout = new FileOutputStream ("file.txt");
          while ((ch = myIStreamReader.read()) != -1) { new PrintStream(fout).print((char)ch); } }
              catch (IOException anIOException) { System.out.println(anIOException); }

    What you fail to understand is that "aint working" and "Problem with output string to command" tells us absolutely squat about what your problem is. This is the same as saying to the doctor "I'm sick" and expecting him to cure you. As mentioned by Enceph you need to provide details. Do you get error messages? If so post the entire error and indicate the line of code it occurs on. Do you get incorrect output? Then post what output you get, what output you expect. The more effort you put into your question the more effort others will put in their replies. So until you can manage to execute a little common sense then the only responses you will get will be flames. Now is your tiny little brain able to comprehend that?

  • Getting problem with DOMImplementation classes method getFeature() method

    hi
    getting problem with DOMImplementation classes method getFeature() method
    Error is cannot find symbol getFeature()
    code snippet is like...
    private void saveXml(Document document, String path) throws IOException {
    DOMImplementation implementation = document.getImplementation();
    DOMImplementationLS implementationLS = (DOMImplementationLS) (implementation.getFeature("LS", "3.0"));
    LSSerializer serializer = implementationLS.createLSSerializer();
    LSOutput output = implementationLS.createLSOutput();
    FileOutputStream stream = new FileOutputStream(path);
    output.setByteStream(stream);
    serializer.write(document, output);
    stream.close();
    problem with getFeature() method

    You are probably using an implementation of DOM which does not implement DOM level-3.

  • TS3297 Why I can't download a free game I get a message that there's a problem with my payment method but not what it is this is a free app I tried support and got nowhere help

    Why can't I down load a free app  I get a message that there is a problem with my payment method but I gave all information correctly , I did recently change my card no because I lost my old one .i did change the no. On my account      HOPE YOU HAVE SOME SUGGESTIONS  I DON'T SEE WHY THEY HAVE TO CHECKMY PAYMENT METHOD FOR A FREE GAME

    Contact iTunes customer support.
    We're all users like yourself and as such have no access to your account.

  • Problem with the renameTO method in the Linux environment

    Hi
    I got a problem with the renameTO method in the Linux environment. The file is not moving.
    This method is returning false. the same code executed successfully in Windows environment.
    Can anyone give some fix to this one or an alternate solution to move the files in both windows and Linux.
    boolean success;
    File root = new File(tempPath);
                   File f = new File(root, phyFileName);
                   File dest = new File(targetPath);
    success = f.renameTo(new File(dest, actualFileName));actualFileName = 400.doc
    dest = /home/jboss-4.0.3/axsscm_1.0/axsscmDocuments/xchange/fileup/fshare/PO/1786

    JITHENDRA wrote:
    Thanks for the prompt replyNo problem.
    >
    Can u solve the below doubt.
    Will renameTo method wont work in Linux? If so why?Did you not read what I said? I suspect you are trying to rename a file so that it actually has to be moved to a different volume (partition or hard disk) so it won't work. One would have the same problem on Windows trying to rename a file on the c: drive to a name on the d: drive.
    >
    >
    Can u give a sample or good link to do the above work which works fine in all environments.?Just follow the pseudo code I gave. 15 minutes work.

  • Problems with the dispatchEvent-Methode

    Hallo,
    I have a strange problem with above mentioned methode
    I have a JTextField, and I want that only numeric inputs are
    accepted, so I used a KeyListener -Interface in the following way
    public void keyTyped(KeyEvent e)
    JTextField field =(JTextField)e.getSource();
    char c =e.getKeyChar();
    if(c>57 | c<46 |c==47 &&c >31)
    field.dispatchEvent(e);
    the other methodes keyPressed and keyReleased are implemented in the same way.
    So if I type in now in my JTextField an 'a' or whatsoever
    then the following Exception occurs:
    java.lang.StackOverflowError
    at java.awt.Toolkit.getEventQueue(Toolkit.java:1483)
    at java.awt.EventQueue.setCurrentEventAndMostRecentTime(EventQueue.java:731)
    at java.awt.Component.dispatchEventImpl(Component.java:3448)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    Mmh, and this is not the whole Exception message.
    There are missing a couple of lines.
    But may be one of you knows what my mistake is.
    Thanks advance.

    This is not the best way to validate for numerics. Check out the "Creating a Validated Text Field" section from the Swing tutorial:
    http://java.sun.com/docs/books/tutorial/uiswing/components/textfield.html#validation

  • Problem with a template method in JDialog

    Hi friends,
    I'm experiencing a problem with JDialog. I have a base abstract class ChooseLocationDialog<E> to let a client choose a location for database. This is an abstract class with two abstract methods:
    protected abstract E prepareLocation();
    protected abstract JPanel prepareForm();Method prepareForm is used in the constructor of ChooseLocationDialog to get a JPanel and add it to content pane.
    Method prepareLocation is used to prepare location of a database. I have to options - local file and networking.
    There are two subclasses ChooseRemoteLocationDialog and ChooseLocalFileDialog.
    When I start a local version, ChooseLocalFileDialog with one input field for local file, everything works fine and my local client version starts execution.
    The problem arises when I start a network version of my client. Dialog appears and I can enter host and port into the input fields. But when I click Select, I get NullPointerException. During debugging I noticed that the values I entered into these fields ("localhost" for host and "10999" for port) were not set for corresponding JTextFields and when my code executes getText() method for these input fields it returns empty strings. This happens only for one of these dialogs - for the ChooseRemoteLocationDialog.
    The code for ChooseLocationDialog class:
    public abstract class ChooseLocationDialog<E> extends JDialog {
         private E databaseLocation;
         private static final long serialVersionUID = -1630416811077468527L;
         public ChooseLocationDialog() {
              setTitle("Choose database location");
              setAlwaysOnTop(true);
              setModal(true);
              Container container = getContentPane();
              JPanel mainPanel = new JPanel();
              //retrieving a form of a concrete implementation
              JPanel formPanel = prepareForm();
              mainPanel.add(formPanel, BorderLayout.CENTER);
              JPanel buttonPanel = new JPanel(new GridLayout(1, 2));
              JButton okButton = new JButton(new SelectLocationAction());
              JButton cancelButton = new JButton(new CancelSelectAction());
              buttonPanel.add(okButton);
              buttonPanel.add(cancelButton);
              mainPanel.add(buttonPanel, BorderLayout.SOUTH);
              container.add(mainPanel);
              pack();
              Toolkit toolkit = Toolkit.getDefaultToolkit();
              Dimension screenSize = toolkit.getScreenSize();
              int x = (screenSize.width - getWidth()) / 2;
              int y = (screenSize.height - getHeight()) / 2;
              setLocation(x, y);
              addWindowListener(new WindowAdapter() {
                   @Override
                   public void windowClosing(WindowEvent e) {
                        super.windowClosing(e);
                        System.exit(0);
         public E getDatabaseLocation() {
                return databaseLocation;
         protected abstract E prepareLocation();
         protected abstract JPanel prepareForm();
          * Action for selecting location.
          * @author spyboost
         private class SelectLocationAction extends AbstractAction {
              private static final long serialVersionUID = 6242940810223013690L;
              public SelectLocationAction() {
                   putValue(Action.NAME, "Select");
              @Override
              public void actionPerformed(ActionEvent e) {
                   databaseLocation = prepareLocation();
                   setVisible(false);
         private class CancelSelectAction extends AbstractAction {
              private static final long serialVersionUID = -1025433106273231228L;
              public CancelSelectAction() {
                   putValue(Action.NAME, "Cancel");
              @Override
              public void actionPerformed(ActionEvent e) {
                   System.exit(0);
    }Code for ChooseLocalFileDialog
    public class ChooseLocalFileDialog extends ChooseLocationDialog<String> {
         private JTextField fileTextField;
         private static final long serialVersionUID = 2232230394481975840L;
         @Override
         protected JPanel prepareForm() {
              JPanel panel = new JPanel();
              panel.add(new JLabel("File"));
              fileTextField = new JTextField(15);
              panel.add(fileTextField);
              return panel;
         @Override
         protected String prepareLocation() {
              String location = fileTextField.getText();
              return location;
    }Code for ChooseRemoteLocationDialog
    public class ChooseRemoteLocationDialog extends
              ChooseLocationDialog<RemoteLocation> {
         private JTextField hostField;
         private JTextField portField;
         private static final long serialVersionUID = -2282249521568378092L;
         @Override
         protected JPanel prepareForm() {
              JPanel panel = new JPanel(new GridLayout(2, 2));
              panel.add(new JLabel("Host"));
              hostField = new JTextField(15);
              panel.add(hostField);
              panel.add(new JLabel("Port"));
              portField = new JTextField(15);
              panel.add(portField);
              return panel;
         @Override
         protected RemoteLocation prepareLocation() {
              String host = hostField.getText();
              int port = 0;
              try {
                   String portText = portField.getText();
                   port = Integer.getInteger(portText);
              } catch (NumberFormatException e) {
                   e.printStackTrace();
              RemoteLocation location = new RemoteLocation(host, port);
              return location;
    }Code for RemoteLocation:
    public class RemoteLocation {
         private String host;
         private int port;
         public RemoteLocation() {
              super();
         public RemoteLocation(String host, int port) {
              super();
              this.host = host;
              this.port = port;
         public String getHost() {
              return host;
         public void setHost(String host) {
              this.host = host;
         public int getPort() {
              return port;
         public void setPort(int port) {
              this.port = port;
    }Code snippet for dialog usage in local client implementation:
    final ChooseLocationDialog<String> dialog = new ChooseLocalFileDialog();
    dialog.setVisible(true);
    location = dialog.getDatabaseLocation();
    String filePath = location;Code snippet for dialog usage in network client implementation:
    final ChooseLocationDialog<RemoteLocation> dialog = new ChooseRemoteLocationDialog();
    dialog.setVisible(true);
    RemoteLocation location = dialog.getDatabaseLocation();Exception that I'm getting:
    Exception occurred during event dispatching:
    java.lang.NullPointerException
         at suncertify.client.gui.dialog.ChooseRemoteLocationDialog.prepareLocation(ChooseRemoteLocationDialog.java:42)
         at suncertify.client.gui.dialog.ChooseRemoteLocationDialog.prepareLocation(ChooseRemoteLocationDialog.java:1)
         at suncertify.client.gui.dialog.ChooseLocationDialog$SelectLocationAction.actionPerformed(ChooseLocationDialog.java:87)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
         at java.awt.Component.processMouseEvent(Component.java:6134)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
         at java.awt.Component.processEvent(Component.java:5899)
         at java.awt.Container.processEvent(Container.java:2023)
         at java.awt.Component.dispatchEventImpl(Component.java:4501)
         at java.awt.Container.dispatchEventImpl(Container.java:2081)
         at java.awt.Component.dispatchEvent(Component.java:4331)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4301)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3965)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3895)
         at java.awt.Container.dispatchEventImpl(Container.java:2067)
         at java.awt.Window.dispatchEventImpl(Window.java:2458)
         at java.awt.Component.dispatchEvent(Component.java:4331)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178)
         at java.awt.Dialog$1.run(Dialog.java:1046)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)java version "1.6.0"
    OpenJDK Runtime Environment (build 1.6.0-b09)
    OpenJDK Client VM (build 1.6.0-b09, mixed mode, sharing)
    OS: Ubuntu 8.04
    Appreciate any help.
    Thanks.
    Edited by: spyboost on Jul 24, 2008 5:38 PM

    What a silly error! I have to call Integer.parseInt instead of getInt. Integer.getInt tries to find a system property. A small misprint, but a huge amount of time to debug. I always use parseInt method and couldn't even notice that silly misprint. Sometimes it's useful to see the trees instead of whole forest :)
    It works perfectly. Sorry for disturbing.

  • Problem with calling onApplicationStart() method

    Hi all,
         I have a problem with calling application.cfc's methods from coldfusion template. The problem is like when i am calling "onapplicationstart" method inside a cfml template i getting the error shown below
    The onApplicationStart method was not found.
    Either there are no methods with the specified method name and argument types or the onApplicationStart method is overloaded with argument types that ColdFusion cannot decipher reliably. ColdFusion found 0 methods that match the provided arguments. If this is a Java object and you verified that the method exists, use the javacast function to reduce ambiguity.
    My code is like below.
    Application.cfc
    <cfcomponent hint="control application" output="false">
    <cfscript>
    this.name="startest";
    this.applicationtimeout = createtimespan(0,2,0,0);
    this.sessionmanagement = True;
    this.sessionTimeout = createtimespan(0,0,5,0);
    </cfscript>
    <cffunction name="onApplicationStart" returnType="boolean">
        <cfset application.myvar = "saurav">
    <cfset application.newvar ="saurav2">
        <cfreturn true>
    </cffunction>
    </cfcomponent>
    testpage.cfm
    <cfset variables.onApplicationStart()>
    I have tried to call the above method in different way also like
    1--- <cfset onApplicationStart()>
    i got error like this
    Variable ONAPPLICATIONSTART is undefined.
    2---<cfset Application.onApplicationStart()>
    The onApplicationStart method was not found.
    Either there are no methods with the specified method name and argument types or the onApplicationStart method is overloaded with argument types that ColdFusion cannot decipher reliably. ColdFusion found 0 methods that match the provided arguments. If this is a Java object and you verified that the method exists, use the javacast function to reduce ambiguity
    Please help me out.
    Thanks
    Saurav

    You can't just call methods in a CFC without a reference to that CFC. This includes methods in Application.cfc.
    What are you trying to do, exactly, anyway? You'd probably be better served by placing a call to onApplicationStart within onRequestStart in Application.cfc, if your goal is to refresh the application based on some condition:
    <cffunction name="onRequestStart">
         <cfif someCondition>
              <cfset onApplicationStart()>
         </cfif>
    </cffunction>
    Dave Watts, CTO, Fig Leaf Software
    http://www.figleaf.com/
    http://training.figleaf.com/

  • Comma problem with global string variable

    Hi,
    I'm fiighting with comma problem for global string variable. I've on page string for example "7nndqrr52vzyb,0" and by dynamic column link I'm assigning this string to global variable. Then I'm trying to display value of that global variable on another page but I see only string till comma, nothings more. I'm not sure what I'm doing wrong because when I'm trying to assign that value normally by computation process as a constant value is fine and see on another page correct string. I'll be really glad for help.
    Thanks
    Cheers,
    Mariusz

    When it tries to display the string, it sees the comma and wants to believe the string is terminated. You could escape the , in the string or replace it with a different character..
    See this link: http://download.oracle.com/docs/cd/E17556_01/doc/user.40/e15517/concept.htm#BEIGDEHF
    Thank you,
    Tony Miller
    Webster, TX
    If vegetable oil is made of vegetables, what is baby oil made of?
    If this question is answered, please mark the thread as closed and assign points where earned..

  • FileWriter problem with my toptenScores method!!!

    Hey ya'll -- i'm STILLLLLL writing this dumb trivia program. I'm now having a problem with the FileWriter - that writes the final scores BACK to the toptenFile.
    I'm hoping all these troubles are just growing pains of my first "big" program (big for me) - BUT I WORKED on this honker all night last night and into this afternoon and I am at my wits end!
    I am posting the writing portion below hoping I am just missing something, but if you guys need the whole code let me know -- and below this code I will show the error I am getting as it trys to write to the file. ---
    if (questionsMissed == 3 )
    if (score > topScoresInt[0])
    String name = JOptionPane.showInputDialog(null,
    "GAME OVER. Your score is " + score + "\n Please enter you initials - no spaces", // Message to display
    "You got a High Score!", JOptionPane.INFORMATION_MESSAGE);
    try {
    BufferedWriter bw=new BufferedWriter(new FileWriter(toptenFile)); String[] scorestoFile = new String[10];
    scoreToFile[0] = (score + " " + name);
    bw.write(scoreToFile[0] + "\n");
    for (i=1; i<=9; i++)
    bw.write(scoreToFile[i] + "\n");
    bw.close();
    System.exit(0);
    } catch (IOException ex) {
    ex.printStackTrace();
    HERE IS THE ERROR WHEN IT TRIES TO WRITE TO THE FILE
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at java.io.Writer.write(Writer.java:126)
    at TriviaGame$answerButtonHandler.actionPerformed(TriviaGame.java:299)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
    at javax.swing.plaf.basic.BasicButtonListener$Actions.actionPerformed(BasicButtonListener.java:285)
    at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1571)
    at javax.swing.JComponent.processKeyBinding(JComponent.java:2763)
    at javax.swing.JComponent.processKeyBindings(JComponent.java:2798)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2726)
    at java.awt.Component.processEvent(Component.java:5265)
    at java.awt.Container.processEvent(Container.java:1966)
    at java.awt.Component.dispatchEventImpl(Component.java:3955)
    at java.awt.Container.dispatchEventImpl(Container.java:2024)
    at java.awt.Component.dispatchEvent(Component.java:3803)
    at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1810)
    at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:672)
    at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:920)
    at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:798)
    at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:636)
    at java.awt.Component.dispatchEventImpl(Component.java:3841)
    at java.awt.Container.dispatchEventImpl(Container.java:2024)
    at java.awt.Window.dispatchEventImpl(Window.java:1774)
    at java.awt.Component.dispatchEvent(Component.java:3803)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

    OK - that helped me!
    I was making the string because I had to stringify the sorting class that I had made earlier -- BUT I FORGOT to stringify -- this is the code I had left out.
    for (i=1; i<=9; i++)
    scoreToFile = top{i}.toString();
    bw.write(scoreToFile[i] + "\n");
    NOW THAT SOLVED EVERYTHING BUT ONE MORE THING!!!!
    IT now writes to the file just fine but I CANT get it to give me a new line -- it is writing everything on one line.... (see how I tried an line break above? -- didnt work) -- any help on getting a line break?
    ** BTW - I just found out and BEFORE you jump on this -- I HAD to change the Arrays above to {i} from the bracket i because it was making it ITALICS and not showing it -- so disregard the curly brace syntax issue above please.
    Message was edited by:
    tvance929

  • [SOLVED][GRUB]Install problem with the new method

    Hi,
    it is not my first install of Arch Linux but I have a problem with this new kind of installation method, especially with GRUB.
    Here is my hard drives configuration :
    /dev/sda1 -> SSD 120 GB ntfs (windows)
    /dev/sdb1 -> HD 1 TB ext4 (data)
    /dev/sdc :
    /dev/sdc1 -> ext2 /boot
    /dev/sdc2 -> swap
    /dev/sdc3 -> ext4 /
    /dev/sdc5 -> ext4 /home
    During the installation, I installed grub (with grub-install) in /dev/sdc. I assumed it was the correct drive to install it but apparently not, Windows starts automatically and I don't have the grub menu.
    Should I install my system again or is there a way to boot on the livecd and install it ?
    Should I :
    1) mount /dev/sdc3 in /mnt then /dev/sdc1 in /mnt/boot and finally /dev/sdc5 in /mnt/home
    2) pacstrap /mnt grub-bios
    3) arch-chroot
    4) grub-install
    Thank you.
    Last edited by hiveNzin0 (2012-09-12 06:15:15)

    DSpider wrote:
    If you set whatever drive "/dev/sdc" is (brand and model) to boot first in the BIOS, all you need to do is install a bootloader on Arch. You don't even need a separate boot partition. It will use the /boot folder on root partition. Then install os-prober (if you don't already have this installed) and re-generate the .cfg.
    https://wiki.archlinux.org/index.php/Be … bootloader
    The problem is that I cannot select another hard drive. The only one available for the boot order is the Samsung 830 series (/dev/sda with Windows).
    The other options are the CD drive and removable disk.
    I checked that this morning, maybe I was too tired. I will check again this evening.
    But if I am right and I cannot select my intel SSD (containing my arch setup) for the boot order, would the solution I described work ? I don't see why not but my knowledge are basic in Linux.
    Thank you again for your help.

  • Need some help with the String method

    Hello,
    I have been running a program for months now that I wrote that splits strings and evaluates the resulting split. I have a field only object (OrderDetail) that the values in the resulting array of strings from the split holds.Today, I was getting an array out of bounds exception on a split. I have not changed the code and from I can tell the structure of the message has not changed. The string is comma delimited. When I count the commas there are 26, which is expected, however, the split is not coming up with the same number.
    Here is the code I used and the counter I created to count the commas:
    public OrderDetail stringParse(String ord)
    OrderDetail returnOD = new OrderDetail();
    int commas = 0;
      for( int i=0; i < ord.length(); i++ )
        if(ord.charAt(i) == ',')
            commas++;
      String[] ordSplit = ord.split(",");
      System.out.println("delims: " + ordSplit.length + "  commas: " + commas + "  "+ ordSplit[0] + "  " + ordSplit[1] + "  " + ordSplit[2] + "  " + ordSplit[5]);
    The rest of the method just assigns values to fields OrderDetail returnOD.
    Here is the offending string (XXX's replace characters to hide private info)
    1096200000000242505,1079300000007578558,,,2013.10.01T23:58:49.515,,USD/JPY,Maker,XXX.XX,XXX.XXXXX,XXXXXXXXXXXXXXXX,USD,Sell,FillOrKill,400000.00,Request,,,97.7190000,,,,,1096200000000242505,,,
    For this particular string, ordSplit.length = 24 and commas = 26.
    Any help is appreciated. Thank you.

    Today, I was getting an array out of bounds exception on a split
    I don't see how that could happen with the 'split' method since it creates its own array.
    For this particular string, ordSplit.length = 24 and commas = 26.
    PERFECT! That is exactly what it should be!
    Look closely at the end of the sample string you posted and you will see that it has trailing empty strings at the end: '1096200000000242505,,,'
    Then if you read the Javadocs for the 'split' method you will find that those will NOT be included in the resulting array:
    http://docs.oracle.com/javase/6/docs/api/java/lang/String.html#split(java.lang.String)
    split
    public String[] split(String regex)
    Splits this string around matches of the given regular expression.  This method works as if by invoking the two-argument split method with the given expression and a limit argument of zero. Trailing empty strings are therefore not included in the resulting array.
    Just a hunch but your 'out of bounds exception' is likely due to your code assuming that there will be 26 entries in the array and there are really only 24.

  • Problem with cl_gui_frontend_services execute method

    Halo experts ,
    I am facing a peculiar problem with  cl_gui_frontend_services execute  .
    I am trying to open documents using the method execute of  cl_gui_frontend_services
    . But the problem is it is not opening file with space in its name .
    ie it is able to open 'for_example.pdf' but not 'for example.pdf'
    Any one has idea why it is happening?
    Regards
    Arshad

    HI Arshad...
    This does not seems to be a problem of GUI...
    bad parameter  exceptions is coming ...  mean you are passing an incorrect parameter ...mean incorrect file name ...or the filename you are passing does not exits in you my documents folder ...
    I have executed the same code  ... and it is perfectly working fine ... you have to pass the file name exactly ... that means  if
    you are passing L11527110.pdf then the file name should be L11527110.pdf...
    if you are passing the parameter as L 11527110.pdf (* with space )   then the file name has to be exactly same ...  other wise ...
    the application ACRORD32.EXE  opens  but gives as error ...
    please check the file name in my docs and passing parameter value ....
    I am giving my code which i did .....
    CALL METHOD cl_gui_frontend_services=>execute
    EXPORTING
    application ='ACRORD32.EXE'
    parameter = 'B CDWBDIC.pdf'
    default_directory = 'C:\Documents and Settings\Ritamadmin\My Documents\'
    maximized = 'X'
    operation = 'OPEN'
    EXCEPTIONS
    cntl_error = 1
    error_no_gui = 2
    bad_parameter = 3
    file_not_found = 4
    path_not_found = 5
    file_extension_unknown = 6
    error_execute_failed = 7
    synchronous_failed = 8
    not_supported_by_gui = 9
    OTHERS = 10.

  • Urgent!!!   Problem on the String method and File method

    I would like to ask two questions:
    (1) From the String method, it can use .equals() method to compare two strings whether two string exactly equal or not. But what method can i use to compare two strings see whether any words exists in the string?
    (2) From the following code,
    Java.io.File outFile = new java.io.File("TestProg.java");If i would like to use a variable (e.g. let the variable be name) instead of the filename "TestProg.java", do you know how to revise the above code??
    If i write as following, is it correct???
    Java.io.File outFile = new java.io.File(""+name+"");Please help!!!

    1- To check whether a word (sunstring) exists in a longer string, you can use the following String method:
    indexOf(substring) on the string that you are searching. If the word does not exist, -1 is returned.
    2- yes you can provide a variable (of type string) in the constrcutor of File.

  • Problem with user defined methods

    Hello,
    I have created a user-defined method using the constructer and a number of sub-methods. The toString method is supposed to return the maximum, minimum, average, and median for an input data set. This program compiles with no problem, but doesn't seem to calculate the statistics. The max, min, med, and mean are all 0. Any help would be appreciated. Thanks a lot.
    import java.util.*;
    public class SO{
    private String id;
    private int N;
    private double[] data;
    private double average;
    private double minimum;
    private double maximum;
    private double med;
         public SO(){
         public void readData(){
              Scanner keyBoard = new Scanner(System.in);
              System.out.println("Enter the id: ");
              id = keyBoard.nextLine();
              System.out.println("Enter the amount of data values in the id: ");
              N = keyBoard.nextInt();
              data = new double[N];
              System.out.println("Enter the values one line at a time: ");
              int j = 0;
              for(int h=0; h<=N-1; h++){
                   data[h] = keyBoard.nextDouble();
              Arrays.sort(data);
         public void setDataValue(int k, double v){
              data[k] = v;
              System.out.printf("Changing data[%d] to %f", k, v);     
         public double getDataValue(int k){
              double get = data[k];
              return get;
         private double mean(){
              double sum = 0;
              for(int k = 0; k<=N-1; k++){
                   sum = sum + data[k];
              average = sum/N;
              return average;
         private double min(){
              minimum = data[0];
              return minimum;
         private double max(){
              maximum = data[N-1];
              return maximum;
         private double median(){
              if(N%2 != 0){
                   med = data[N/2];
              else if(N%2 == 0){
                   med = (data[N/2] + data[N/2-1])/2.;
              return med;
         public void displayData(){
              System.out.printf("[");
              for(int k = 0; k<=N-1; k++){
                   System.out.printf("%.2f", data[k]);
                   if(k != N-1){
                        System.out.printf(", ");
              System.out.printf("]");
         public void sortData(){
              Arrays.sort(data);
              System.out.printf("[");
              for(int k = 0; k<=N-1; k++){
                   System.out.printf("%.2f", data[k]);
                   if(k != N-1){
                        System.out.printf(", ");
              System.out.printf("]");
         public void analyzeData(){
              System.out.println(this);     
         public String toString(){
              return id +"\n" + "minimum = " + minimum + "\n" + "maximum = " + maximum + "\n" + "median = " + med + "\n" + "mean = " + average;
         public static void main(String[] args){
              SO v = new SO();
              System.out.println("Read Data");
              v.readData();
              System.out.println("Display Data");
              v.displayData();
              System.out.println("Analyze Data");
              v.analyzeData();
              System.out.println("Set Data\n");
              v.setDataValue(0,98.75);
              v.displayData();
              System.out.println("Sort Data");
              v.sortData();
              System.out.println("Access Data\n");
              System.out.println("data[0] = " + v.getDataValue(0));
              System.out.println("\nDisplay v");
              System.out.println(v);
    }

    Sorry
    import java.util.*;
    public class SO{
       private String id;      
       private int N;          
       private double[] data;
       private double average;
       private double minimum;
       private double maximum;
       private double med;
         public SO(){
            public void readData(){
                 Scanner keyBoard = new Scanner(System.in);
              System.out.println("Enter the id: ");
              id = keyBoard.nextLine();
              System.out.println("Enter the amount of data values in the id: ");
              N = keyBoard.nextInt();
              data = new double[N];
              System.out.println("Enter the values one line at a time: ");
              int j = 0;
              for(int h=0; h<=N-1; h++){
                   data[h] = keyBoard.nextDouble();
              Arrays.sort(data);
            public void setDataValue(int k, double v){
                 data[k] = v;
              System.out.printf("Changing data[%d] to %f", k, v);     
            public double getDataValue(int k){
                 double get = data[k];
              return get;
            private double mean(){
                 double sum = 0;
              for(int k = 0; k<=N-1; k++){
                   sum = sum + data[k];
              average = sum/N;
              return average;
            private double min(){
                 minimum = data[0];
              return minimum;
            private double max(){
                 maximum = data[N-1];
              return maximum;
            private double median(){
                 if(N%2 != 0){
                   med = data[N/2];
              else if(N%2 == 0){
                   med = (data[N/2] + data[N/2-1])/2.;
              return med;
            public void displayData(){
                 System.out.printf("[");
              for(int k = 0; k<=N-1; k++){
                   System.out.printf("%.2f", data[k]);
                   if(k != N-1){
                        System.out.printf(", ");
              System.out.printf("]");
            public void sortData(){
                 Arrays.sort(data);
              System.out.printf("[");
              for(int k = 0; k<=N-1; k++){
                   System.out.printf("%.2f", data[k]);
                   if(k != N-1){
                        System.out.printf(", ");
              System.out.printf("]");
            public void analyzeData(){
                 System.out.println(this);       
            public String toString(){
                 return id +"\n" + "minimum = " + minimum + "\n" + "maximum = " + maximum + "\n" + "median = " + med + "\n" + "mean = " + average;
         public static void main(String[] args){
              SO v = new SO();
              System.out.println("Read Data");
                     v.readData();
                     System.out.println("Display Data");
                     v.displayData();
                     System.out.println("Analyze Data");
                     v.analyzeData();
                     System.out.println("Set Data\n");
                     v.setDataValue(0,98.75);
                     v.displayData();
                     System.out.println("Sort Data");
                     v.sortData();
                     System.out.println("Access Data\n");
                     System.out.println("data[0] = " + v.getDataValue(0));
                     System.out.println("\nDisplay v");
                     System.out.println(v);
    }

Maybe you are looking for

  • Error while starting resin 3.0.14  after installing coherence evaluation

    I am getting the following error... java.lang.SecurityException: The necessary license to perform the operation is not available; a license for "com.tangosol.run.xml.SimpleParser@e3 570c" is required. As I see the license file is in the tangosol.jar,

  • Orange UK - FilmToGo

    I was recently delighted to find out about the Orange FilmToGo initiative. How great to be able to rent a film for 30days for the cost of 35p and to be offered a different film each week. So I duly ordered 3 films between 11th August and 8th Septembe

  • Camera Calibration Profiles

    Does anyone know of a plug in for Aperature to calibrate the colour profile of a camera?   I have seen a process used in Lightroom with an xrite ColorPassport and software to create a colour profile to apply across a set of images to correct to a cal

  • Adding a clickable link in a PSD to Dreamweaver file...

    Hi, Honestly, I'm not sure if it's better to ask this here or in the Dreamweaver forum. But basically, how do I add a clickable URL to a PSD template using PSD and DW CS3? A bit of history here, I am not really good at PSD CS3, yet, but my hosting co

  • Save question

    The file size is 4.8 before I open it in CS6. That is verified from the properties info from Windows or Bridge. Once I open it in Photoshop and tey to Save or Save As, without changing anything, as a jpeg file, the size doubles according to the info