powered by Jive Software

How to create a SparkTab object without any Component?


When I created SparkTab object with its constructor, I found puzzles.

In Javadoc of Spark 2.6.3, SparkTab class shold have one only constructor: public SparkTab(javax.swing.Icon icon, java.lang.String text).

But when I create a SpartTab object during coding, I find the constructor of SparkTab class is “public SparkTab(SparkTabbedPane pane, Component comp)” but not the previously mentioned constructor. I think this maybe a negligence of Spark group for forgetting updating related document.

Here is my question:

How to create a SparkTab object only with a icon and title? if I use SparkTab(SparkTabbedPane, Component) to initialize SparkTab class, I have to add one Component object to SparkTab object and I don’t want do that because I don’t wanna any component to be added to SpartTab before I set SparkTab’s layout.