system
30. April 2011 um 04:12
1
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 ;
Beni
30. April 2011 um 05:03
2
Call SingleCDockable.toFront() and the dockable will move to the front (i.e. the tab selection should change).
system
30. April 2011 um 05:30
3
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);
}
system
30. April 2011 um 05:37
4
thx it worked!
public void enProInfo(){
((DefaultSingleCDockable) information).toFront();
}
Beni
30. April 2011 um 05:47
5
Sorry, I did not think of that.