Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JPanel  RSS feed

 
kalai sundar
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to get x-Codinates and y-cordinaes of JPanel?
vat method i should use?
Hepl me



kalai
 
Stuart Gray
Ranch Hand
Posts: 410
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
API docs for JPanel.

Hint: The get method in question is inherited from JPanel's parent class.
 
Books
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think If you see the API documentation for Parent class JComponent you will get the methods easily.
If you will apply these methods on your JPanel Object they will give you co-ordinate values.

example::
JPanel jp1 = new JPanel();
int xCordinate = jp1.getX();
int yCordinate = jp1.getY();
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!