Hello
I am trying to get to a Component On a JInternalFrame. I have a reference to the frame
on the frame there is a panel. on the panel there is a JTabbedPane. to add a tab to
the JTabbedPane I need to reference the Pane. Is there a way to do this?
thanks
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package view.notes.tabs;
import javax.swing.JInternalFrame;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;
/**
*
* @author Steve's
*/
public class AddNoteTab {
public AddNoteTab() {
}
public void simpleTab(String thisFrameName, String folderName, JInternalFrame thisFrame) {
String M = (" --> in simpleTab(" + thisFrameName + c + folderName +c+thisFrame.getTitle()+ ") var: thisFrameName : folderName : thisFrame<-- \n");
System.out.println(M);
System.out.println(C + M + AND + thisFrame.getTitle() + ":thisFrame.getName() : \n");
JInternalFrame frame = thisFrame;
int count= frame.getContentPane().getComponentCount();
System.out.println(C+M+AND+count+": count of components on JInternalframe: \n");
[b]no clue how to get to the JTabbedPane[/b]
//JPanel p =(JPanel) frame.getContentPane().getComponent(0);
//JTabbedPane jtp =p.
}
}
output
CLASS
CreateOneNoteTabFile:
--> in setOneNoteFolderSystemDir() var: xxxxxxxxx : xxxxxxxx<--
: meals:thisFrameName :
CLASS
CreateOneNoteTabFile:
--> in setOneNoteFolderSystemDir() var: xxxxxxxxx : xxxxxxxx<--
: C:\Users\Steve's\.targetFolders\admin\admin\One Note Folder\meals\Dinner time: systemDir :
--> in simpleTab(meals , Dinner time , meals1) var: thisFrameName : folderName : thisFrame<--
CLASS
AddNoteTab:
--> in simpleTab(meals , Dinner time , meals1) var: thisFrameName : folderName : thisFrame<--
[b][i]The following line shows the frame I need[/i][/b]
[b] : meals1:thisFrame.getName() : [/b]
CLASS
AddNoteTab:
--> in simpleTab(meals , Dinner time , meals1) var: thisFrameName : folderName : thisFrame<--
[b][i]The following line shows the number of components [/i][/b]
[b] : : 1: count of components on JInternalframe: : [/b]
until tomorrow goodbye