Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Cannot find symbol error  RSS feed

 
Pooja Oza
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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); "
^


 
Rob Spoor
Sheriff
Posts: 20893
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!