AnsweredAssumed Answered

Adding a tab on spark workspace

Question asked by rwema on May 6, 2008
Latest reply on Jul 29, 2010 by oldboy


I was using the tutorial Sparkplug Development Guide. I tried the addTabToSpark() function to add a tab on the workspace but didn't work. I have used the code below instead and it worked. Is it a change in the API? I am using sparkplug kit 2_0_7.








  • Adds a tab to Spark


    private void addTabToSpark(){

         // Get Workspace UI from SparkManager

        Workspace workspace = SparkManager.getWorkspace();


        // Retrieve the Tabbed Pane from the WorkspaceUI.

        SparkTabbedPane tabbedPane = workspace.getWorkspacePane();


        // Add own Tab.

        tabbedPane.addTab("My Plugin", new ImageIcon(), new JButton("Hello"));