2011-03-06 2 views
0

내 질문은 : JComboBox에서 "경계선"을 선택할 때 JTabbedPane 내에서 유지되는 탭이 앞에 오도록 만드는 방법은 무엇입니까? 지역 또는 기타 탭과 마찬가지로JTabbedPane 내에서 Tab 키를 앞으로 가져 오겠습니까?

private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {           
    String selectedItem = jComboBox1.getSelectedItem().toString(); 

    if(selectedItem != null) 
    { 
     //if perimeter option selected, show the tab for it 
     if(selectedItem.equals("Perimeter")) 
     { 
      //bring the permeter tab to the front, all contained within a tabbedPane 
     } 

     if(selectedItem.equals("Area")) 
     { 
      //bring the area tab to the front, all contained within a tabbedPane 
     } 
    } 
} 

답변

0

표시 및 보이지 않음 옵션으로 사용할 수 있으므로 주변을 선택하면 탭 영역에 경계 정보가 표시됩니다. 당신이 다른 상단에 탭 창을 넣어 찾고 있다면

frame.setVisible(true); 

하거나 시도 할 수 있습니다 : Java Swing - how to show a panel on top of another panel?

관련 문제