title: How to access to items inside the menu item (JMenu) java
body: <p>I want to switch language in my netbeans platform application and I need to access to the text in all JMenu items</p>
  
  <p>I use this code : </p>
  
  <pre><code>int iCount = JM.getItemCount();
                          for (int i = 0; i &lt; iCount; i++) {
                                  JMenuItem itemObject = JM.getItem(i);
                                  if (itemObject != null ) {
                                       itemObject.setText("newtext") ;                                   
  
                              }
  
                          }
  </code></pre>
  
  <p>it Changes the item text ,but the display text does not change.</p>