Results 1 to 7 of 7
- 06-30-2011, 10:30 AM #1
Member
- Join Date
- Jun 2011
- Posts
- 3
- Rep Power
- 0
Error Using Email Client tutorial from Java-Tips
Help
.gif)
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.
- 06-30-2011, 12:21 PM #2
What Email Client tutorial from Java-Tips? We're not mind-readers here. Post a link.
db
- 06-30-2011, 12:30 PM #3
Member
- Join Date
- Jun 2011
- Posts
- 3
- Rep Power
- 0
Oh yeah sorry
here the link Java Tips - How to create an e-mail client in Java
- 06-30-2011, 01:12 PM #4
From the page linked:
1) There's no reason for the class cast to blow up, which would anyways be a run time -- not compile time -- error.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(); }
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
- 07-02-2011, 11:29 PM #5
Member
- Join Date
- Jun 2011
- Posts
- 3
- Rep Power
- 0
@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
- 08-25-2011, 01:56 PM #6
Member
- Join Date
- Aug 2011
- Posts
- 1
- Rep Power
- 0
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.
- 09-28-2011, 08:41 PM #7
Member
- Join Date
- Sep 2011
- Posts
- 1
- Rep Power
- 0
Similar Threads
-
I am getting a cannot find symbol error on this code from Oracle Java tutorial site
By bigsonny in forum New To JavaReplies: 8Last Post: 06-15-2011, 05:26 AM -
About the Email Client tutorial from Java-Tips
By St Pierre in forum AWT / SwingReplies: 18Last Post: 03-16-2011, 08:57 AM -
email client
By gvpproject in forum AWT / SwingReplies: 4Last Post: 03-01-2010, 12:33 PM -
Open source Email client (Desktop Based)
By success21061985 in forum Advanced JavaReplies: 1Last Post: 01-18-2009, 07:00 PM -
Access Email usind a java mail client Access Email usind a java mail client
By consult4u in forum Enterprise JavaBeans (EJB)Replies: 2Last Post: 07-31-2007, 08:29 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks