• Post Reply Bookmark Topic Watch Topic
  • New Topic

Maintaining dynamic arraylist hirarchy in java programming  RSS feed

 
Gajen Pingalkar
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to show on screen a dynamic menu structure, which grow as per databasae values.

Menu
|-submenu1
|-submenu2
|-submenu2
|-submenu3
(dynamically it could grow)
I have Menu and sub menu listing in one table where sub menu have there parent code. All Main have Parent Code "1".
For achieving this I crated one class which have all attribute of menu and one list for sub menu.
Here is the code which i have written,
 
Nicholas Jordan
Ranch Hand
Posts: 1282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From Java Look and Feel Design Guidelines:

Because many people (especially novice users, children, and older people) find submenus difficult to use, minimize the use of submenus, especially with these populations. If at all possible, avoid using a second level of submenus. If you want to present a large or complex set of choices, display them in a dialog box.


Is there another way to do it ? n-dimensions arrays encounter a resistant model in Java coding. I can navigate a screen full of them, it introduces confusion in people who do not code everyday. Would a utility window work ? A utility window is a window whose contents affect an active primary window. Unlike secondary windows, utility windows remain open when primary windows are closed or minimized. An example of a utility window is a tool that is used to select.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!