Yes Sarinam, Google is the best place. You can find large number of examples on the web. At least try one of them and ask any question if you stuck with them.

More important thing is, pay attention on what masijade says.

07-09-2008, 06:54 AM

Sarinam

Quote:

Originally Posted by Eranga

Yes Sarinam, Google is the best place. You can find large number of examples on the web. At least try one of them and ask any question if you stuck with them.

More important thing is, pay attention on what masijade says.

Hello Sir

Now i am abel to create a menu item but don't know how i impliment .chm file.Sir plz help me

07-09-2008, 07:24 AM

Eranga

What you mean implement? Adding click events and stuff are you looking?

07-09-2008, 07:54 AM

Sarinam

Quote:

Originally Posted by Eranga

What you mean implement? Adding click events and stuff are you looking?

Yes sir adding click event....

07-09-2008, 08:03 AM

masijade

Did you read those two tutorials and the API docs for Desktop that I posted?

The last one shows you how to create menus and add ActionListeners to the Items.

The second one shows you how to write an ActionListener.

The first one (the API doc) shows you a class you can use to allow a system to "open" a "chm" file with the "default" program assigned to handle it.

So, write an ActionListener that calls desktop and attach it to your menu item.

That's it.

07-09-2008, 08:19 AM

Sarinam

Quote:

Originally Posted by masijade

Did you read those two tutorials and the API docs for Desktop that I posted?

The last one shows you how to create menus and add ActionListeners to the Items.

The second one shows you how to write an ActionListener.

The first one (the API doc) shows you a class you can use to allow a system to "open" a "chm" file with the "default" program assigned to handle it.

So, write an ActionListener that calls desktop and attach it to your menu item.

That's it.

Can you give me some example code..

07-09-2008, 08:32 AM

masijade

Post your attempt at it, and we will help you correct it, but we are not going to do it for you. Those tutorials have enough code snippets as it is, anyway. And a little Google searching, I can guarantee, will turn up a code snippit for Desktop.

07-09-2008, 08:36 AM

Eranga

Yep, shows your code where you stuck with and try to get our members help. I'm sure that too, you can easily find an example on the web related to your application.

07-09-2008, 08:48 AM

Sarinam

Quote:

Originally Posted by Eranga

Yep, shows your code where you stuck with and try to get our members help. I'm sure that too, you can easily find an example on the web related to your application.

Sir i just create a menu and i havn no idia how i add chm..here is code

at main.MainMenu.actionPerformed(MainMenu.java:10)
at java.awt.MenuItem.processActionEvent(Unknown Source)
at java.awt.MenuItem.processEvent(Unknown Source)
at java.awt.MenuComponent.dispatchEventImpl(Unknown Source)
at java.awt.MenuComponent.dispatchEvent(Unknown Source)
at java.awt.MenuComponent.dispatchEventImpl(Unknown Source)
at java.awt.MenuComponent.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)