• Post Reply Bookmark Topic Watch Topic
  • New Topic

Mouse Clicks using java in eclipse.

 
gow tham
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to perform mouse action based upon the label name(nor X and Y co-ordinations).

Example:

In eclipse I want to click File menu based upon the File menu label(label,or It's class name, method() name) using java code.

Is it possible in java? If YES. Please tell me how can i do it.

else give me some ideas how can we achieve this task.


Thanks in advance.

Santhosh
 
Rob Camick
Ranch Hand
Posts: 2699
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't use a MouseListener. Instead use an ActionListener.

Read the section from the Swing tutorial on How to Use Menus for an example.
 
gow tham
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Camick,

Thank you so much for your response. The link and your comments are highly aid me to get some ideas, but still I confused to do which I want.

Actually, I want to perform pure mouse actions(Clicking buttons, selecting check boxes, and select radio button)based upon the GUI label(name), But all the tutorials are given the example to perform with JFrame which we have created.

These examples makes me confusing.

Honestly I'm not professional developer. My professional is testing(QA), but I believe I have sufficient programming knowledge to understand the code. Please give me some sample that i can perform in eclipse IDE.

Note:

The objective of my question is:

How to perform the ActionEvent() in existed iDE?(The frame have File menu, Edit menu and so on.) Is it possible to do with Java?

Please share your ideas with me.

Thanks in advance.

Santhosh.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!