| Author |
Cannot find symbol error
|
Pooja Oza
Greenhorn
Joined: Apr 01, 2009
Posts: 21
|
|
Can someone please help me with this code? I cannot run this program. I am getting the error - "Cannot find symbol
symbol : method setOpaque(boolean)
method : class Login
newContentPane.setOpaque(true); "
^
|
Thanks,
Pooja Oza
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
|
setOpaque is a method of JComponent, and although JFrame is part of Swing it does not (directly or indirectly) extend JComponent. Therefore, JFrame has no such method. Since you're wrapping the Login instance in a new JFrame you might as well make Login extend JPanel instead.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
 |
|
|
subject: Cannot find symbol error
|
|
|