Results 1 to 4 of 4
Thread: Unable to compile...
- 05-13-2011, 07:46 PM #1
Member
- Join Date
- May 2011
- Posts
- 2
- Rep Power
- 0
Unable to compile...
New here, but I thought this would be the right place to ask. Whenever I try to compile a .class using ColorPanel, I keep getting an error saying it can't find the symbol. Here's the source.
And I get these errors.Java Code:import javax.swing.*; import java.awt.*; public class GUIWindow{ public static void main(String [] args) { JFrame theGUI = new JFrame(); theGUI.setTitle("GUI Program"); theGUI.setSize(300, 200); theGUI.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); ColorPanel panel = new ColorPanel(Color.gray); Container pane = theGUI.getContentPane(); pane.add(panel); theGUI.setVisible(true); } }
Any help would be appreciated as I would like not to skip things in this book.Java Code:GUIWindow.java:10: cannot find symbol symbol : class ColorPanel location: class GUIWindow ColorPanel panel = new ColorPanel(Color.gray); ^ GUIWindow.java:10: cannot find symbol symbol : class ColorPanel location: class GUIWindow ColorPanel panel = new ColorPanel(Color.gray); ^ 2 errors
- 05-13-2011, 08:01 PM #2
Is ColorPanel a class that you have made yourself or downloaded? It's not a general Java-class, in any case.
- 05-13-2011, 08:26 PM #3
Member
- Join Date
- May 2011
- Posts
- 2
- Rep Power
- 0
The book I got didn't specify to download one, and nowhere did I make one, so I guess I'll have to skip it or work around it. Thanks for your input.
- 05-14-2011, 12:32 AM #4
Senior Member
- Join Date
- Jun 2008
- Posts
- 339
- Rep Power
- 5
Similar Threads
-
unable to compile class for jsp
By ashok bhagat in forum JavaServer Pages (JSP) and JSTLReplies: 1Last Post: 11-26-2010, 08:40 AM -
able to compile but unable to run. can any one tell me wats the mistake?
By mallik.koneru in forum New To JavaReplies: 11Last Post: 05-18-2010, 01:49 PM -
org.apache.jasper.JasperException: Unable to compile class for JSP
By satya kishore in forum JavaServer Pages (JSP) and JSTLReplies: 3Last Post: 04-13-2010, 02:40 PM -
JasperException: Unable to compile
By Aerinai in forum Java ServletReplies: 0Last Post: 06-17-2008, 06:16 PM -
Unable to compile
By gapper in forum New To JavaReplies: 2Last Post: 01-14-2008, 04:31 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks