Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JTabbedPane - addTab issue  RSS feed

Matt Fielder
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have lines in my Tabbed Pane class to add tabs to the panes. This is one.

According to the API, I can use this framework for this setup.

void addTab(String title, Icon icon, Component component, String tip)
Adds a component and tip represented by a title and/or icon, either of which can be null.

I have created a Welcome() class as a dummy class so that the reference doesn't fail.

I think the issue is with the "Component component" of new Welcome(). Why is this giving me problems and how should I proceed? Should I make a method that calls the Component constructor and call that method instead?

Thanks in advance

JDK 1.5
IDE Eclipse
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!