Bring a Tab to front

Hi,

i have a question. How can i bring a Tab to front. For Example:

There are to Tabs, Tab 1 and Tab 2. Tab 2 is active (set to front). Now i want to press a Button to update some data in Tab 1. Now Tab 1 have to be active. How can i realise that?

i use:

SingleCDockable
CGrid ;
CControl ;

Call SingleCDockable.toFront() and the dockable will move to the front (i.e. the tab selection should change).

Eclipse says: The method toFront() is undefined for the type SingleCDockable

Do i have to do a cast to my variable?


SingleCDockable information = createDockable("Information", DiagnosticInformationView);

public void enableProjectInformation(){
        information.toFront();
    
    }

private SingleCDockable createDockable(String title, IFView view){
        JPanel panel = new JPanel();
        panel.setLayout(new BorderLayout());

        panel.add((Component) view, BorderLayout.CENTER);

        panel.addMouseListener(new MouseAdapter(){
            
        });
        
        return new DefaultSingleCDockable(title, title, panel);
    }


thx it worked!


public void enProInfo(){
        ((DefaultSingleCDockable) information).toFront();
    
    }

Sorry, I did not think of that.

No problem… :slight_smile: