codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  help me  kwkinitial at 07:10 on Monday, March 22, 2010
 

best wishes ....
I'm from Indonesia
I make a java script, where this script will read all the menus in the main menu ..

private void GetMenu(){
for (int i=0;i<jMenuBar1.getMenuCount();i++){
System.out.println("JUMLAH MENU =="+ jMenuBar1.getMenuCount() );
System.out.println("NOMOR MENU =="+i);
ScanningMenu2(jMenuBar1.getMenu(i));
}

}


private void ScanningMenu2(java.awt.Component menucomp){

if (menucomp.getClass().toString().equalsIgnoreCase("class javax.swing.JMenu")) {
javax.swing.JMenu M=(JMenu) menucomp;
System.out.println("KODE MENU =="+M.getName());
System.out.print("NAMA MENU ==");
System.out.println(M.getText());
for(int i=0;i<M.getMenuComponentCount();i++){
ScanningMenu2(M.getMenuComponent(i));
System.out.println("NO URUT MENU ITEM =="+i);
System.out.println("M.getMenuComponentCount()=="+M.getMenuComponentCount());
}


} else
if (menucomp.getClass().toString().equalsIgnoreCase("class javax.swing.JMenuitem")) {
javax.swing.JMenuItem JMI=(JMenuItem)menucomp;
System.out.println("KODE MENU ITEM =="+JMI.getName());
System.out.print("NAMA MENU ITEM ==");
System.out.println(JMI.getText());


}

}
hasil output

JUMLAH MENU ==3
NOMOR MENU ==0
KODE MENU ==menu01
NAMA MENU ==File
KODE MENU ITEM ==20032010001
NAMA MENU ITEM ==Proto Setting
NO URUT MENU ITEM ==0
M.getMenuComponentCount()==10
KODE MENU ITEM ==20032010002
NAMA MENU ITEM ==Repair User
NO URUT MENU ITEM ==1
M.getMenuComponentCount()==10
NO URUT MENU ITEM ==2
M.getMenuComponentCount()==10
KODE MENU ITEM ==20032010003
NAMA MENU ITEM ==Log In
NO URUT MENU ITEM ==3
M.getMenuComponentCount()==10
KODE MENU ITEM ==20032010004
NAMA MENU ITEM ==Log Out
NO URUT MENU ITEM ==4
M.getMenuComponentCount()==10
NO URUT MENU ITEM ==5
M.getMenuComponentCount()==10
KODE MENU ITEM ==20032010005
NAMA MENU ITEM ==Switch User
NO URUT MENU ITEM ==6
M.getMenuComponentCount()==10
KODE MENU ITEM ==20032010006
NAMA MENU ITEM ==Exit Switch User
NO URUT MENU ITEM ==7
M.getMenuComponentCount()==10
NO URUT MENU ITEM ==8
M.getMenuComponentCount()==10
KODE MENU ITEM ==20032010007
NAMA MENU ITEM ==Exit
NO URUT MENU ITEM ==9
M.getMenuComponentCount()==10
JUMLAH MENU ==3
NOMOR MENU ==1
KODE MENU ==m02
NAMA MENU ==Database
KODE MENU ITEM ==20032010101
NAMA MENU ITEM ==Pelanggan
NO URUT MENU ITEM ==0
M.getMenuComponentCount()==6
KODE MENU ITEM ==20032010102
NAMA MENU ITEM ==Pemasok
NO URUT MENU ITEM ==1
M.getMenuComponentCount()==6
NO URUT MENU ITEM ==2
M.getMenuComponentCount()==6
KODE MENU ITEM ==20032010103
NAMA MENU ITEM ==Kategori Barang
NO URUT MENU ITEM ==3
M.getMenuComponentCount()==6
KODE MENU ITEM ==20032010104
NAMA MENU ITEM ==Barang
NO URUT MENU ITEM ==4
M.getMenuComponentCount()==6
KODE MENU ITEM ==20032010105
NAMA MENU ITEM ==Lokasi / Gudang
NO URUT MENU ITEM ==5
M.getMenuComponentCount()==6
JUMLAH MENU ==3
NOMOR MENU ==2
KODE MENU ==m03
NAMA MENU ==Transaction
KODE MENU ITEM ==null
NAMA MENU ITEM ==Penjualan
NO URUT MENU ITEM ==0
M.getMenuComponentCount()==4
KODE MENU ITEM ==null
NAMA MENU ITEM ==jMenuItem14
NO URUT MENU ITEM ==1
M.getMenuComponentCount()==4
KODE MENU ITEM ==null
NAMA MENU ITEM ==jMenuItem15
NO URUT MENU ITEM ==2
M.getMenuComponentCount()==4
KODE MENU ITEM ==null
NAMA MENU ITEM ==jMenuItem16
NO URUT MENU ITEM ==3
M.getMenuComponentCount()==4

now I'm confused how do I save the output in the form of an array before I save to the database.
please help me..........

  Re: help me  Elain at 08:15 on Wednesday, October 27, 2010
 

I think the problom is so difficult to me:)

----------------------------------------------
http://www.menu-flash.com
http://www.logo-maker.net
http://www.sothink.com/product/swfeasy/








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: checkbox verification..headache!!
•  Re: FREE dating software worth over $350 for free
•  Re: button software
•  Re: never mind
•  Re: Blocking Key Press
•  Can anyone help me with c++ code?
•  Re: Great Site - Made my day!
•  Re: display new url each day
•  Re: adding sound to this reflex game


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2010