Results 1 to 7 of 7
  1. #1
    lasyn is offline Member
    Join Date
    Jun 2011
    Posts
    3
    Rep Power
    0

    Default Error Using Email Client tutorial from Java-Tips

    Help
    I have Try Email Client tutorial from Java-Tips, there is error when I compile
    ================================================== ===========
    init:
    deps-jar:
    Compiling 1 source file to D:\Kuliah\Skripsi\Programe Priyo\mailclient\build\classes
    D:\Kuliah\Skripsi\Programe Priyo\mailclient\src\mailclient\ConnectDialog.java :167: getType() in ConnectDialog cannot override getType() in Window
    public String getType() {
    return type String is not compatible with Type
    1 error
    BUILD FAILED (total time: 0 seconds)
    ================================================== ============
    someone know, what coused, please
    Last edited by lasyn; 06-30-2011 at 10:33 AM.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,234
    Rep Power
    19

    Default

    What Email Client tutorial from Java-Tips? We're not mind-readers here. Post a link.

    db

  3. #3
    lasyn is offline Member
    Join Date
    Jun 2011
    Posts
    3
    Rep Power
    0

    Default

    Quote Originally Posted by DarrylBurke View Post
    What Email Client tutorial from Java-Tips? We're not mind-readers here. Post a link.

    db
    Oh yeah sorry here the link Java Tips - How to create an e-mail client in Java

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,234
    Rep Power
    19

    Default

    From the page linked:
    Java Code:
    public class ConnectDialog extends JDialog {
      private static final String[] TYPES = {"pop3", "imap"};
      private JComboBox typeComboBox;
      :
      :
        typeComboBox = new JComboBox(TYPES);
      :
      :
      public String getType() {
        return (String) typeComboBox.getSelectedItem();
      }
    1) There's no reason for the class cast to blow up, which would anyways be a run time -- not compile time -- error.
    2) The only Window class in the ancestors is java.awt.Window which doesn't have a getType() method.

    The only possible reason I can see for that error is that you have your own package or packages and class or classes with names similar to the JDK classes, and that has messed up your imports.

    db

  5. #5
    lasyn is offline Member
    Join Date
    Jun 2011
    Posts
    3
    Rep Power
    0

    Default

    @DarrylBurke
    Yeah, that righ, there is some thing on my computer that cause I ca't use getType() method on this program,
    yesterday night, I try it in my Laptop there is no problem

  6. #6
    kilya is offline Member
    Join Date
    Aug 2011
    Posts
    1
    Rep Power
    0

    Default

    In Java Platform SE 7 the AWT.Window class implements the method getType() with a Window.Type return value. Downgrade your JDK or refactor your own method.

  7. #7
    airtel121 is offline Member
    Join Date
    Sep 2011
    Posts
    1
    Rep Power
    0

    Default Re: Error Using Email Client tutorial from Java-Tips

    hey i downgrade my JDK and its work 4 me...but when i fill detail n press connect ..after some time it display unable 2 connect...
    plz help me..
    i used bellow detail..
    pop3
    pop.gmail.com
    my gmail id
    my gmail pass
    smtp.gmail.com

Similar Threads

  1. Replies: 8
    Last Post: 06-15-2011, 05:26 AM
  2. About the Email Client tutorial from Java-Tips
    By St Pierre in forum AWT / Swing
    Replies: 18
    Last Post: 03-16-2011, 08:57 AM
  3. email client
    By gvpproject in forum AWT / Swing
    Replies: 4
    Last Post: 03-01-2010, 12:33 PM
  4. Open source Email client (Desktop Based)
    By success21061985 in forum Advanced Java
    Replies: 1
    Last Post: 01-18-2009, 07:00 PM
  5. Access Email usind a java mail client Access Email usind a java mail client
    By consult4u in forum Enterprise JavaBeans (EJB)
    Replies: 2
    Last Post: 07-31-2007, 08:29 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •