• Post Reply Bookmark Topic Watch Topic
  • New Topic

JTabbedPane method addTab in error  RSS feed

 
shalaka wadekar
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to compile my source file. I have imported javax.swing.JTabbedPane. While compiling I get an error: cannot resolve symbol symbol: method addTab(java.lang.String, MyLoginPanel)

In my code I have:
tabbedPane = new JTabbedPane(SwingConstants.LEFT);
tabbedPane.addTab("Login", m_oLoginPanel);

where m_oLoginPanel is an object I have previously declared to store the instance of my compiled class MyLoginPanel

Can someone tell me what is going wrong here.

Regards,
Shalaka
 
Rob Spoor
Sheriff
Posts: 21052
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the super class of MyLoginPanel? It seems that it is not a Component.
 
shalaka wadekar
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
MyLoginPanel is being called from another class (SampleApplet) which I am currently trying to compile when I encounter this error.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!