Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JPanel with screwy dimensions and coordinates

Status
Not open for further replies.

MigrantFirmWorker

Programmer
Apr 9, 2003
54
0
0
US
I have a JPanel placed in a JTableHeader into which I intend to add other components. While attempting to determine mouse click locations in this panel I found that the x/y coordinates are negative (for the JPanel rectangle) and the height/width are 0/0.

The JPanel displays as I expect and certainly has nonzero dimensions. It is my intent to use getDeepestComponentAt() once I add the subcomponents but I need to derive the correct location for the "At". What am I missing?

-thanx

Chris

-------------------------------------------------------------
"Don't be deceived. We're all temporary employees.
 
I suggest that you post some source code that can be compiled and run.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top