File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getRowForLocation(...) in JComboBox?

 
Meyer Florian
Ranch Hand
Posts: 62
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey there!
In JTree or JList etc. I have a method like "getRowForLocation(int x, int y)" or "rowAtLocation(Point p)".
Do you know how to find out the row-for-location in a JComboBox?
Thanks!
Praiser
 
Krishna Mohan
Ranch Hand
Posts: 44
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Iam not sure I understood your question.
Are you trying to find out index of the element or a
element at a index in JComboBox?
 
Meyer Florian
Ranch Hand
Posts: 62
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The methods e.getX() and e.getY() give me the current mouse position.
The method getRowForLocation(...) or rowAtLocation(...) give me the index of the row that the mouse cursor is over (not the selected row).
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic