This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java and have Dr. Raoul-Gabriel Urma & Richard Warburton on-line!
See this thread for details.
Win a flower (🌹) or copy of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java (📚) this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
master stewards:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
garden masters:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
gardeners:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

Mouse Clicks using java in eclipse.

 
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
 
pollinator
Posts: 3134
27
  • 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
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.
 
Being a smart alec beats the alternative. This tiny ad knows what I'm talking about:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!