Can you see the problem?

i'm trying to write a simple image viewer application.
Can you see the problem. i can't. i'll appreciate any advice or help?
import java.awt.*;
import java.awt.image.*;
import java.awt.event.*;
import java.io.*;
public class SimpleViewer extends Frame {
     protected Image awtImage;
     public void loadAndDisplay(String filename) {
          Image img = readImage(filename);
          awtImage = img;
          int width = img.getWidth(this);
          int height = img.getHeight(this);
          displayImage(img, width, height);
     public void displayImage(Image img, int width, int height) {
          addWindowListener(
               new WindowAdapter() {
                    public void windowClosing(WindowEvent e){
                         System.exit(0);
          setTitle("Simple Viewer ");
          pack();
          setSize(new Dimension(width, height));
          show();
          repaint();
     public image readImage(String filename) {
          Image image = Toolkit.getDefaultToolkit().getImage(imageName);
          MediaTracker imageTracker = new MediaTracker(this);
          imageTracker.addImage(image, 0);
          try{
               imageTracker.waitForID(0);
          }catch(InterruptedException e){ return null;}
          return image;
     public void paint(Graphics g){
          Rectangle rect = this.getBounds();
          if(awtImage != null) {
               g.drawImage(awtImage, 0,0,rect.width, rect.height, this);
     public static void main(String[] args){
          SimpleViewer ip = new SimpleViewer();
          if(args.length <1) {
               System.out.println("Enter a valid image file name");
               System.exit(0);
          ip.loadAndDisplay(args[0]);
}

check this line and tell me what you see... after all, it's the source of your compiler errors...
public image readImage(String filename) {
          Image image = Toolkit.getDefaultToolkit().getImage(imageName);once you figure that out, it will work...
( hint : check variable names and capitalization of names )
- MaxxDmg...
- ' He who never sleeps... '

Similar Messages

  • Can you see the delivery destination on the tracking information?

    I'm thinking that I made a mistake on my delivery address.
    When I realize the mistake, I changed the address. from IL to FL.
    I received the email from Apple, that my new order has been shipped (Ipad).
    When I track my order on FEDEX, I only can see PICKED UP. on Nashville TN.
    And I can't see the destination city or area. (normally all the Fedex shipments have information about destination).
    And the tracking is still on PICKED UP, why is not IN TRANSIT? (2 days picking the package up??)
    I live in FL.
    Can you see the delivery information on your tracking orders?
    Will my package be deliver in IL or FL?

    Call Apple and see what they can do.  My guess would be that if you tried to change your order in any way after the status was changed from Processing, you won't have success.  And if the address was listed as IL, not Florida at the time of shipping, your item is likely headed to IL.  If your item is listed as picked up, it's not in transit because all iPads are being held at the shipper until the 16th as the earliest delivery date.

  • I was trying to make a purchase from Amazon & a return but FIREFOX would not let me open drop down boxes in the purchase & return areas. I was forced to use IE to accomplish the deed. Can you investigate the problem?

    I was trying to make a purchase from Amazon & a return but FIREFOX would not let me open drop down boxes in the areas. I was forced to use IE to accomplish the deed. Can you investigate the problem? Thanx, David Deters

    Thanks for the welcome Karsten! I’ve checked the installer disks – which appear to have all the main pieces of software, but not iDVD. If you or anyone knows where it might be hidden that would be great. Thanks for all the other info too!
    Thanks Lennart – I don’t think my computer could support iLife ’05 as it is running Mac OSX 10.3.2 and I’ve just been looking at its system requirements which state it requires 10.3.4 minimum – if you know differently, please let me know. As an alternative I have considered getting iLife ’04, but your comment about iLife ’05 being the first version to support external drives worried me (“iDVD 5 is the first iDVD version that officially supports external burners“ does this mean there is an unofficial option for iLife ‘04? Perhaps a patch similar to the one mentioned by Karsten), does that mean iLife ’04 would not support an external Lacie DVD writer?
    What is the earliest version of Toast I’d be able to use (as a money saving option!)?
    Thank you both, and apoligies for my amateurish questions…
    Kevin.

  • HT1461 For Boot Camp, if you save a file when you are on the Windows side, when you return to the Mac side, can you see the file or can it only be "seen" on the operating side you create it in?

    For Boot Camp, if you save a file when you are on the Windows side, when you return to the Mac side, can you see the file or can it only be "seen" on the operating side you create it in?

    Why don't you  (generic most every post lacks critical details) be clear and say you never used Mac OS etc.
    But, I did try to anticipate and give you what you needed.
    Excel is one of those rare programs that, if they are extremely large complex spreadsheets still tend to run better under Office for Windows.
    A VM won't do for that but it does make it easier to transition. As in: install Windows natively, then use VMware Fusion or Parallels to attach to the partition and OS. That way you can run Windows as Guest OS VM under Mac; and still run Windows natively dual-boot when needed.
    The word "see" was not what you wanted, was it? really? you want to open and make changes and keep it on Windows side rather than Save As or copy to Mac
    You use Windows and don't know it has NTFS (NT FileSystem)?
    http://en.wikipedia.org/wiki/NTFS
    http://en.wikipedia.org/wiki/Hierarchical_File_System (HFS) native file system used by Apple
    And there is much more UEFI style "bios" and other things I suppose.
    Great thing about Google and encyclopedias or dictionary, you can look up what you don't know.

  • Why am I not able to type into my pdf files. Why is the cursor only appearing at he areas where there in no typing? I believe I know who's doing this, but can you fix the problem for me please?

    I cannot type into one of my pdf files. The cursor only appears where there is no typing. I believe there is foul play going on on my computer, Can you fix this problem?

    Hi Donna,
    Let's see if we can get to the bottom of this mystery! I hope it's not foul play.
    You say the problem is with just one of your PDF files? What version of Acrobat/Reader are you using? If you're in Reader, you're limited to commenting/annotating the PDF (you can't edit text with Reader, so you wouldn't be able to select text that's in the PDF already).
    Please let me know what program/tools you're using and we can take it from there.
    Best,
    Sara

  • Can you see the error ?

    Here is the code (a few lines removed) :
    public class Alone{
        static final int PACKET_SIZE = 8192;
        public static int nbPackets = 0;
        Vector[] queue;
        Thread[] thread;
        boolean run;
        int id;
        public Alone(int port) throws Exception{
         queue = new Vector[NB_OF_QUEUES];
         for(int i=0;i<NB_OF_QUEUES;i++){
             queue[i] = new Vector();
         thread = new Thread[NB_OF_THREADS];
         thread[T_RECEIVE] = new Receive(this);
        public DatagramPacket getPacket(int q){
         DatagramPacket dp;
         if(q==FREE && queue[FREE].isEmpty()){
             nbPackets++;
             dp = new DatagramPacket(new byte[PACKET_SIZE],PACKET_SIZE);
         }else{
             synchronized(queue[q]){
              dp = (DatagramPacket)queue[q].firstElement();
              queue[q].remove(0);
         return dp;
        }I'm calling the "getPacket" method from a thread which receives DatagramPacket through a DatagramSocket this way :
    public class Receive extends Thread {
        private Alone alone;
        public Receive(Alone c){
         alone = c;
         setName("Receive");
        public void run(){
         DatagramPacket dp = alone.getPacket(Alone.FREE);
         try{
             while(alone.getRun()){
              System.out.println(getName() +":sleeping");
              alone.socket.receive(dp);
              System.out.println(getName() +":wake up");
              System.out.println(getName() +" >>> packet received");
              alone.addPacket(Alone.RECEIVED, dp, Alone.T_REDIRECT);
         }catch(Exception e){
             System.out.println(e);
    }But when it gets to the "alone.socket.receive(dp);" it raises a "java.lang.NullPointerException". So i guess theres is a problem in the passing of the DatagramPacket's reference, but I just can't point out where the error is. Anyone see the problem ?

    Okay thanks for the advice ! i'll follow it from now on.
    //in class Receive
        public void run(){
         DatagramPacket dp = alone.getPacket(Alone.FREE);
         while(alone.getRun()){
             System.out.println(getName() +":sleeping");
             try{
              alone.socket.receive(dp);
             }catch(IOException e){e.printStackTrace();}
             System.out.println(getName() +":wake up");
             System.out.println(getName() +" >>> packet received");
             alone.addPacket(Alone.RECEIVED, dp, Alone.T_REDIRECT);
    //in class Alone
        public DatagramPacket getPacket(int q){
         DatagramPacket dp;
         if(q==FREE && queue[FREE].isEmpty()){
             System.out.println("instanciating a new DatagramPacket");
             nbPackets++;
             dp = new DatagramPacket(new byte[PACKET_SIZE],PACKET_SIZE);
         }else{
             synchronized(queue[q]){
              dp = (DatagramPacket)queue[q].firstElement();
              queue[q].remove(0);
         return dp;
        }running this will prompt
    instanciating a new DatagramPacket
    Receive:sleeping
    java.lang.NullPointerException
            at alone.Receive.run(Receive.java:19)

  • M faceing one error on my screen when m using adobe premiere & save file then the one massage come on my display "adobe premier pro cs6 has been sttoped working" can you resolve the problem

    m faceing one error on my screen when m using adobe premiere & save file then the one massage come on my display "adobe premier pro cs6 has been sttoped working" can you resolve the problem

    Nobody can tell you anything without system information and other details. Ask in teh Premiere forum and provide al lthe required info.
    Mylenium

  • HT2509 Can you see the list of fonts in the actual font?

    Is it possible to see the name of the font in the list in the actual font?

    If you are looking for a third-party utility that can display the various font faces in a list, then there might be one available (I'm not sure which is the best one, but there may be a good free one out there); however, if you want to view them in various font menus that you access in the system then as I mentioned above this will be an application-specific behavior, and some will support it whereas others will not.
    Despite this, one crude approach to previewing fonts is to use Apple's "Stacks" view for folders in the Dock. To do this, go to the Macintosh HD/Library/Fonts/ folder and drag it to the Dock next to the trash. Then click it to open it and you will see your fonts listed, with capital and lower-case A characters in the font face. You can then highlight a font either by hovering over it with your mouse or by using the arrow keys, and then press the Space bar to show a preview of it for you to get a better sense of its style.
    The fonts on the system will be in the following folders:
    Macintosh HD/Library/Fonts
    Macintosh HD/System/Library/Fonts
    Macintosh HD/Users/username/Library/Fonts (this library folder is hidden but can be revealed by holding Option then opening the Go meny in the Finder).

  • Where can you see the time of the movie

    Hello to you all, i have a question about Imovie 11. A friend send me 3 small video's from his phone, with a description wich fragments to use.
    Example: Movie 1: from 00.00.35 - 00:01:27 and from 00:02.40 - 00:002.49, etc.
    But I don't see a timeline? I can't see where I am in the movie.
    I need to select fragments based on time, it would seem to me that this is really basic functionality?
    Thanks in advance,
    Simon

    Hmm, it works for the project, but not in the library, then you just get the title of the date and time the video has been imported. (And that is the place where I would like to see the original time changing)
    If I use the information in the project, I can't cut several pieces of time, because than the time of the second fragment wouldn't be right anymore..
    Thanks for you reply!

  • Can you find the problem in this code?

    I've searching some examples of the using of JTable on this forum.
    So I've used a code found here.
    But nothing happens, the JFrame doesn't appear on screen.
    I'm sure my database "CLIENTES" exists inside the db folder. And also there's data inside "CLIENTES" table.
    So, where is the problem then?
    Thanks.
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.table.*;
    public class TelaPrincipal extends JFrame {
       public TelaPrincipal() {
            Vector columnNames = new Vector();
            Vector data = new Vector();
            try {
               //  Connect to the Database
               String driver = "org.hsqldb.jdbcDriver";
               String url = "jdbc:hsqldb:file:./db/CLIENTES";
               String userId = "sa";
               String password = "";
               Class.forName(driver);
               Connection connection = DriverManager.getConnection(url, userId, password);
               //  Read data from a table
               String sql = "SELECT * FROM CLIENTES";
               Statement stmt = connection.createStatement();
               ResultSet rs = stmt.executeQuery(sql);
               ResultSetMetaData md = rs.getMetaData();
               int columns = md.getColumnCount();
               //  Get column names
               for (int i = 1; i <= columns; i++){
                  columnNames.addElement( md.getColumnName(i) );
               //  Get row data
               while (rs.next()) {
                  Vector row = new Vector(columns);
                  for (int i = 1; i <= columns; i++) {
                     row.addElement(rs.getObject(i));
                  data.addElement(row);
               rs.close();
               stmt.close();
            catch(ClassNotFoundException cnfe) {
               cnfe.printStackTrace();
            catch(SQLException sqle) {
              sqle.printStackTrace(); 
            //  Create table with database data
            JTable table = new JTable(data, columnNames);
            JScrollPane scrollPane = new JScrollPane( table );
            getContentPane().add(scrollPane);
        public static void main(String[] args) {
           TelaPrincipal tp = new TelaPrincipal();
           tp.setDefaultCloseOperation(EXIT_ON_CLOSE);
           tp.pack();
           tp.setVisible(true);
    }

    the jdbc driver is not on the classpath?

  • My firefox keep crashing despite resetting. Can you trace the problem for me to see what causing the crash

    <pre><nowiki>bp-3f4bb08d-89f6-43ab-a93e-6f1ed2140314 14/03/2014 12:43
    9806af78-801a-40f5-a6de-9f68ab5f14d6 13/03/2014 15:01
    bp-ee689087-5526-4abb-8912-5e4e32140313 13/03/2014 13:31
    bp-b078ef78-f5e1-4a34-9d8a-797fd2140313 13/03/2014 12:39
    bp-310a31d5-50e2-4853-ad42-4d7232140309 10/03/2014 02:27
    </nowiki></pre>

    There are a lot of Avast (9.0.2013.292) files showing the the modules list of the crash report, so you may want to check the settings there and make sure to update to the latest version.
    Boot the computer in Windows Safe Mode with network support (press F8 on the boot screen) as a test to see if this helps.

  • Can you identify the problem with my podcast xml?

    I've checked this with the suggested feed checker and all looks good yet my podcasts are not showing up in itunes (well over a week now)
    http://www.hbnradioshow.com/itunes.xml
    Any help would be greatly appreciated!
    Thank you,
    George

    Your feed appears to be OK, and when subscribed to manually in iTunes (from the 'Advanced' menu) all the episodes appear. (However the categories are obsolete: you should choose your categories from those listed here.)
    I couldn't find your podcast in the Store by searching, so as you haven't given its URL I can't check that.
    Several people have complained recently that the Store is being very slow to update new episodes: it usually takes 1-2 days but it's sometimes been a lot more, and I'm afraid that you seem to be stuck in the same problem. There isn't really anything you can do about it as your feed is OK.
    You could try iTunes Support - they often aren't as helpful as one would wish (you are likely to get a form answer telling you to update a podcast, which you already know) but possibly it's worth trying. Go to http://www.apple.com/support/itunes/ - click on 'Other iTunes Store Features' in the list and then on 'Podcasts'. You will see a link to 'Express Lane', which will guide you eventually to some contact options.

  • HELP Can you see the missing parenthesis ?!

    Dear People,
    I am doing a simple program that creates a ContactBook and allows keyboard entry of lastName, telephoneNumber and emailAddress.
    I have a few error messages that say parenthesis missing but I don't
    see any missing ! :
    "Note.java": Error #: 200 : '{' expected at line 15
    "Note.java": Error #: 200 : '}' expected at line 59
    "TryContactBook.java": Error #: 200 : ')' expected at line 30
    "TryContactBook.java": Error #: 200 : ')' expected at line 42
    below is the coding
    thank you in advance
    Stan
    import java.util.*;
    public class TryContactBook
       private Note note;
       public static void main(String[] args)
         ContactBook myContactBook = new ContactBook();
         FormattedInput input = new FormattedInput();
         Note note = new Note();
         System.out.println("Enter the number of new notes you wish to record ");
         int numberOfNotes = input.readInt();
         System.out.println("Ready to record " + numberOfNotes + "note(s) ");
         for (int i = 0; i < numberOfNotes; i++)
           try
             System.out.print("Enter a last name: ");
              note.setLastNaame(input.readString());
             System.out.println("last name input is: " + notes.getLastName());
           catch (InvalidUserInputException e)
              System.out.println("InvalidUserInputException thrown when inputting last name. \n" +
                         e.getMessage());
            try
               System.out.println("Enter a telephone number ");
              note.setTelephoneNumber(input.readString();
             System.out.println("telephone number input is: " + notes.getTelephoneNumber());
           catch (InvalidUserInputException e)
              System.out.println("InvalidUserInputException thrown when inputting last name. \n" +
                         e.getMessage());
            try
              System.out.println("Enter an e-mail address ");
              note.setTelephoneNumber(input.readString();
              System.out.println("e-mail address  input is: " + notes.getEmailAddress());
            catch (InvalidUserInputException e)
              System.out.println("InvalidUserInputException thrown when inputting last name. \n" +
              e.getMessage());
    =====================================================================
    import java.util.*;
    * A class to maintain an arbitrarily long list of contacts.
    * Notes are numbered for external reference by a human user.
    * In this version, note numbers start at 0.
    * @author Stan Dominski
    public class ContactBook
        // Storage for an arbitrary number of notes.
        private ArrayList notes;
         * Perform any initialization that is required for the
         * notebook.
        public ContactBook()
            notes = new ArrayList();
         * Store a new note into the notebook.
         * @param note The note to be stored.
        public void storeNote(String note)
            notes.add(note);
         * @return The number of notes currently in the notebook.
        public int numberOfNotes()
            return notes.size();
         * Show a note.
         * @param noteNumber The number of the note to be shown.
        public void showNote(int noteNumber)
            if(noteNumber < 0 || noteNumber > numberOfNotes())
                // This is not a valid note number, so do nothing.
            else
                // This is a valid note number, so we can print it.
                System.out.println(notes.get(noteNumber));
         * Remove a note from the notebook if it exists.
         * @param noteNumber The number of the note to be removed.
        public void removeNote(int noteNumber)
           if(noteNumber < 0 || noteNumber > numberOfNotes())
           System.out.println("noteNumber is not valid.");
           else
            notes.remove(noteNumber);
          * List all the notes in the notebook
           public void listNotes()
              Iterator i = notes.iterator();
               Iterator myIterator = notes.iterator();
              while(i.hasNext() && myIterator.hasNext())
                 System.out.print(notes.indexOf(i.next() ) + ":" );
                 System.out.println("" + myIterator.next());
    =======================================================================
    import java.util.*;
    public class Note
       private ArrayList contactInfo;
       private String lastName;
       private String telephoneNumber;
       private String emailAddress;
       public class Note()
            contactInfo = new ArrayList();
           this.lastName = lastName;
          this.telephoneNumber = telephoneNumber;
          this.emailAddress = emailAddress;
        public  void setLastName(String lastName)
           this.lastName = lastName;
              public String getLastName()
                 return lastName;
                    public  void setTelephoneNumber(String telephoneNumber)
                       this.telephoneNumnber = telephoneNumber;
              public String getTelephoneNumber()
                 return telephoneNumber;
                    public  void setEmailAddress(String emailAddress)
                        this.emailAddress = emailAddress;
                  public String getEmailAddress()
                     return emailAddress;
    ======================================================================
    import java.io.*;
    import java.util.*;
    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    import java.io.IOException;
    public class FormattedInput
         public String readString() throws InvalidUserInputException
           if(readToken() == tokenizer.TT_WORD || ttype == '\"' ||  ttype == '\'')
            return tokenizer.sval;
           else
             throw new InvalidUserInputException(" readString() failed. ..... Input data is not a string");
         // Method to read an int value
    public int readInt() throws InvalidUserInputException
       if (readToken() != tokenizer.TT_NUMBER)
         throw new InvalidUserInputException(" readInt() failed. " + " input data not numeric");
       else
         return (int)tokenizer.nval;   // value is numeric so return as int
           //helper method to read the next token
           private int readToken()
             try
               ttype = tokenizer.nextToken();
               return ttype;
             catch(IOException e)
               e.printStackTrace(System.err);
               System.exit(1);
              return 0;
           //object to tokenize input from the standard input stream
           private StreamTokenizer tokenizer = new StreamTokenizer(
                                                new BufferedReader(
                                                 new InputStreamReader(System.in)));
           private int ttype;                  //stores the token type code
    ======================================================================
    import java.io.StreamTokenizer;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.BufferedReader;
    public class InvalidUserInputException extends Exception
       public InvalidUserInputException() { }
          public InvalidUserInputException(String message)
              super(message);

    I have out comments on the errors I found. There might be more.
    I couldn't get the indentation to work so it will look a bit funny.
    //David
    "Note.java": Error #: 200 : '{' expected at line 15
    "Note.java": Error #: 200 : '}' expected at line 59
    "TryContactBook.java": Error #: 200 : ')' expected at
    line 30
    "TryContactBook.java": Error #: 200 : ')' expected at
    line 42
    import java.util.*;
    public class TryContactBook
    private Note note;
    public static void main(String[] args)
    ContactBook myContactBook = new ContactBook();
    FormattedInput input = new FormattedInput();
    Note note = new Note();
    System.out.println("Enter the number of new notes you wish to record ");
    int numberOfNotes = input.readInt();
    System.out.println("Ready to record " + numberOfNotes + "note(s) ");
    for (int i = 0; i < numberOfNotes; i++)
    try
    System.out.print("Enter a last name: ");
    note.setLastNaame(input.readString());
    System.out.println("last name input is: " +
    is: " + notes.getLastName());
    catch (InvalidUserInputException e)
    System.out.println("InvalidUserInputException
    xception thrown when inputting last name. \n" +
    e.getMessage());
    try
    System.out.println("Enter a telephone
    telephone number ");
    note.setTelephoneNumber(input.readString()); // 1 error
    System.out.println("telephone number input
    er input is: " + notes.getTelephoneNumber());
    catch (InvalidUserInputException e)
    System.out.println("InvalidUserInputException
    xception thrown when inputting last name. \n" +
    e.getMessage());
    try
    System.out.println("Enter an e-mail address
    l address ");
    note.setTelephoneNumber(input.readString()); // 2 error
    System.out.println("e-mail address  input
    ss  input is: " + notes.getEmailAddress());
    catch (InvalidUserInputException e)
    System.out.println("InvalidUserInputException
    xception thrown when inputting last name. \n" +
    e.getMessage());
    =======================================================
    =============
    import java.util.*;
    * A class to maintain an arbitrarily long list of
    contacts.
    * Notes are numbered for external reference by a human
    user.
    * In this version, note numbers start at 0.
    * @author Stan Dominski
    public class ContactBook
    // Storage for an arbitrary number of notes.
    private ArrayList notes;
    * Perform any initialization that is required for
    for the
    * notebook.
    public ContactBook()
    notes = new ArrayList();
    * Store a new note into the notebook.
    * @param note The note to be stored.
    public void storeNote(String note)
    notes.add(note);
    * @return The number of notes currently in the
    the notebook.
    public int numberOfNotes()
    return notes.size();
    * Show a note.
    * @param noteNumber The number of the note to be
    o be shown.
    public void showNote(int noteNumber)
    if(noteNumber < 0 || noteNumber >
    umber > numberOfNotes())
    // This is not a valid note number, so do
    mber, so do nothing.
    else
    // This is a valid note number, so we can
    , so we can print it.
    System.out.println(notes.get(noteNumber));
    * Remove a note from the notebook if it exists.
    * @param noteNumber The number of the note to be
    o be removed.
    public void removeNote(int noteNumber)
    if(noteNumber < 0 || noteNumber >
    mber > numberOfNotes())
    System.out.println("noteNumber is not
    is not valid.");
    else
    notes.remove(noteNumber);
    * List all the notes in the notebook
    public void listNotes()
    Iterator i = notes.iterator();
    Iterator myIterator = notes.iterator();
    while(i.hasNext() && myIterator.hasNext())
    System.out.print(notes.indexOf(i.next() )
    f(i.next() ) + ":" );
    System.out.println("" +
    println("" + myIterator.next());
    =======================================================
    ===============
    import java.util.*;
    public class Note
    private ArrayList contactInfo;
    private String lastName;
    private String telephoneNumber;
    private String emailAddress;
    public class Note()
    contactInfo = new ArrayList();
    this.lastName = lastName;
    this.telephoneNumber = telephoneNumber;
    this.emailAddress = emailAddress;
    public  void setLastName(String lastName)
    this.lastName = lastName;
    public String getLastName()
    return lastName;
    public  void setTelephoneNumber(String
    neNumber(String telephoneNumber)
    this.telephoneNumnber =
    telephoneNumnber = telephoneNumber;
    public String getTelephoneNumber()
    return telephoneNumber;
    public  void setEmailAddress(String
    lAddress(String emailAddress)
    this.emailAddress = emailAddress;
    public String getEmailAddress()
    return emailAddress;
    }} // 3 error
    =======================================================
    ==============
    import java.io.*;
    import java.util.*;
    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    import java.io.IOException;
    public class FormattedInput
    public String readString() throws
    rows InvalidUserInputException
    if(readToken() == tokenizer.TT_WORD || ttype ==
    ype == '\"' || ttype == '\'')
    return tokenizer.sval;
    else
    throw new InvalidUserInputException("
    eption(" readString() failed. ..... Input data is not
    a string");
    // Method to read an int value
    public int readInt() throws
    InvalidUserInputException
    if (readToken() != tokenizer.TT_NUMBER)
    throw new InvalidUserInputException(" readInt()
    nt() failed. " + " input data not numeric");
    else
    return (int)tokenizer.nval; // value is numeric
    eric so return as int
    //helper method to read the next token
    private int readToken()
    try
    ttype = tokenizer.nextToken();
    return ttype;
    catch(IOException e)
    e.printStackTrace(System.err);
    System.exit(1);
    return 0;
    //object to tokenize input from the standard
    andard input stream
    private StreamTokenizer tokenizer = new
    = new StreamTokenizer(
    new
    new
    new
    new BufferedReader(
    new
    new
    new
    new
    new
    new
    new
    new InputStreamReader(System.in)));
    private int ttype; //stores
    stores the token type code
    =======================================================
    ==============
    import java.io.StreamTokenizer;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.BufferedReader;
    public class InvalidUserInputException extends
    Exception
    public InvalidUserInputException() { }
    public InvalidUserInputException(String
    tring message)
    super(message);

  • Help?  can't see the problem

    Hi folks
    I know that there is a "bug" in the attached code, but I
    just don't see it. There is NO validation taking place. I can put
    this page up and hit the submit button with NO DATA in the filed,
    and it is accepted. I wanted to used the mask="AAAAAAAAA" or
    pattern=[A-Za-z] with validate="noblanks, regex", but again...There
    is SOMETHING wrong in the code (probably the <CFINPUT> area,
    but again...don't see it.
    Can some of you please look with fresher eyes (and a more
    open mind) and see if you can see this error?
    Many Thanks

    Hi Dan,
    thanks for the input. I have tried changing the validateat to
    all three accepted methods, and get the same result. (and I did try
    that again this morning just after reading your message). Still no
    luck. It's bizarre!
    Thanks again.

  • Where can you see the size of your image?

    Hi all,
    For contests and such, I need to know the size of my images. I don't know where the size--in inches--displays in LR, so I always have to export to Photoshop to see what the size of the image is at different resolutions (240ppi, 300ppi, 600ppi). There must be a way, can anyone fill me in?
    Thanks!
    Alec

    You wrote:
    "images are by and large worthless in the real world unless they are printed in some fashion which requires inches"
    Yes, but that does not mean that images on your computer (your hard drive) have a dimension in inches. The size in inches is determined on output for printing and varies according to the resolution that you choose for the print. For instance if you have an image with a pixel size of 2000 x 3000 pixels - if you print it at a resolution of 300 ppi / dpi the image size in inches will be 6.66" x 10". If you print it with a resolutin of 200 ppi / dpi the size in inches will be 10" x 15"; and if you print it with a resolution of 100 ppi / dpi the size will be 20" x 30". Of course, a print resolution of 100 ppi / dpi is only theoretical, because the quality of the print will be awful, and if you want to print an image of 2000 x 3000 ppi in a size of 20' x 30' you have to upsample (enlarge) it first.
    So size of an image in inches is detyermind by the formula: pixel amount / resolution in ppi/dpi.
    ppi = pixels per inch - ppi is used when we talk about an image on screen
    dpi = dots per inch - dpi is used when we talk about print output.
    You also wrote:
    "LR printing is fine for snapshots but insufficient for printing from large format printers for fine art."
    Why, do you say that? Printing from LR is not substantially different than printing from Photoshop. LR gives you the same printing options as does Photoshop.
    I suggest you have a second look at the Print Module in LR.
    WW

Maybe you are looking for