Results 1 to 5 of 5
Thread: Swings
- 08-31-2009, 11:20 AM #1
Member
- Join Date
- Aug 2009
- Posts
- 3
- Rep Power
- 0
- 08-31-2009, 11:37 AM #2
Member
- Join Date
- Aug 2009
- Posts
- 3
- Rep Power
- 0
I had executed a simple prog Iam getting this error
""exception in thread main java.lang.noclassdeffounderror""
Can U give Me Solution for this.....
- 08-31-2009, 12:04 PM #3
Hi,
Whether ur file got compiled? Are u able to see your class file.
Ur path is correct?
Gothru this article for guidance.
JavaWorld Forums: Exception in thread "main" java.lang.NoClassDef...Ramya:cool:
- 08-31-2009, 12:09 PM #4
Member
- Join Date
- Aug 2009
- Posts
- 3
- Rep Power
- 0
Awt Prog is Not executing..Plse .Check this
Java Code:import java.awt.*; import java.applet.*; import java.io.*; public class MenuDemo { public static voidmain(String args[]) { MenuBar mb =new MenuBar(); Menu f1=new Menu("file"); f1.add(new MenuItem("new")); f1.add(new MenuItem("open")); f1.addSeparator(); f1.add(new MenuItem("save")); f1.add(new MenuItem("save as")); f1.addSeparator(); f1.add(new MenuItem("close")); mb.add(f1); Frame f=new Frame("Menus Demo"); f.setSize(300,300); f.pack(); f.setVisible(true); } }Last edited by Fubarable; 08-31-2009 at 02:09 PM. Reason: code tags added for readability
-
Your void and your main words are concatenated together. Is this a typographical error or is this how your program truly looks? In other words, this:
should look like this:Java Code:public static voidmain(String args[])
Also, you really should be learning Swing, not AWT.Java Code:public static void main(String args[]) // note gap between void and main
Last edited by Fubarable; 08-31-2009 at 02:13 PM.
Similar Threads
-
JAVA-Swings
By HariPrasad in forum AWT / SwingReplies: 6Last Post: 12-29-2010, 02:29 AM -
jdbc with swings
By raghu9198 in forum New To JavaReplies: 3Last Post: 06-24-2009, 10:42 PM -
interface in swings
By r.srimathi in forum AWT / SwingReplies: 4Last Post: 01-29-2009, 08:44 AM -
awt and swings
By masa in forum AWT / SwingReplies: 2Last Post: 11-24-2008, 07:09 AM -
java swings
By emperoraj in forum AWT / SwingReplies: 0Last Post: 03-26-2008, 11:50 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks