"Exception in thread "main" java.lang.Error: Unresolved compilation problems:
paintComponent cannot be resolved to a type
paintComponent cannot be resolved to a type
at oval.main(oval.java:8)"
Rob Camick
Ranch Hand
Joined: Jun 13, 2009
Posts: 1788
2
posted
0
paintComponent() is a "method", not a "class". You can't create an instance of it.
I suggest you read the section from the Swing tutorial on Custom Painting.
Also, use the "code tags" when posting code so the code retains its formatting and is readable.
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32644
4
posted
0
Rob Camick wrote: . . . Also, use the "code tags" when posting code so the code retains its formatting and is readable.
since he's new, I'll do that, and we can see how much better the post looks.
chanakya nani, welcome to JavaRanch
I would advise you not to use an IDE at this stage; get used to a decent text editor and write the GUI code by hand. Also get used to the Oracle/Sun compiler's error messages.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.