//设置DetailPanel 标题标识 与宽度
public static void setDetailPanelTitle(DetailPanel detailPanel, String titleName, int w) {
detailPanel.setTitle(titleName);
Component[] comps = detailPanel.getComponents();
for (int i = 0; comps != null && i < comps.length; i++) {
if (comps[i] instanceof KDPanel
&& "controlPanel".equals(comps[i].getName())) {
KDPanel controlPanel = (KDPanel) comps[i];
Component[] comps2 = controlPanel.getComponents();
for (int j = 0; comps2 != null && j < comps.length; j++) {
if (comps2[j] != null
&& "kdDetailCon".equals(comps2[j].getName())) {
KDContainer kdConTitle = (KDContainer) comps2[j];
controlPanel.add(kdConTitle,new com.kingdee.bos.ctrl.swing.KDLayout.Constraints(0, 5, w, 19, 5));
}
}
}
}
}