• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getActions() method

 
krishna prasad gunasekaran
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1.getActions() method returns an aray of Action object. do the number of objects differ for different components?.

2. what does the returned array hold? if they are the actions that a component on which the getAction() method was called can perform, why do some components like menu don't have the getAction() method. doesn't that mean we can't perform any action on menus.
 
Kaydell Leavitt
Ranch Hand
Posts: 690
Eclipse IDE Firefox Browser Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know for sure, but I think that you can only perform actions for JMenuItem s.

What kind of Action do you want to do for JMenu s?

Kaydell
[ May 17, 2007: Message edited by: Kaydell Leavitt ]
 
krishna prasad gunasekaran
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
may be i want to make a right click on menu and see if i have anything i can do,say like add some more items to that menu, just like we do in windows.
 
Kaydell Leavitt
Ranch Hand
Posts: 690
Eclipse IDE Firefox Browser Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Would a PopupMenu give you what you need?

I mostly use a Mac but I'd like to learn about what you said about right-clicking on menus to add to menus. Where is that?

Kaydell
[ May 17, 2007: Message edited by: Kaydell Leavitt ]
 
krishna prasad gunasekaran
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
that is when we right click on the menubar of any window, it's espective options will appear and when we click the option that particular option or all of it's associated options will appear on tha menu. for example when we right click on the meu of an IE window, options like 'standard buttons', 'address bar' etc., will appear, and when you choose any of them a set of items appear on th menu bar. How come we achieve this kind of operation in java swing when thre is no action assocated with JMenubar.
 
Kaydell Leavitt
Ranch Hand
Posts: 690
Eclipse IDE Firefox Browser Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know the answer to your question, but I know that on the Mac, you right-click -- not on the menu bar -- but you right-click in the Tool area.

I want to develop Swing apps that work for both Mac and Windows and work in a manner that when run on a Mac would work the way that a Mac user would expect and when run on Windows would work in the way that a Windows user would expect.

Kaydell
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic