• Post Reply Bookmark Topic Watch Topic
  • New Topic

JPanel Coordinates

 
Benjamin Rohrer
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Quick question about JPanels. Are the coordinates of a JPanel laid out left-to-right and up-to-down? In other words, are smaller X-coordinates to the left of a component and are smaller Y-coordinates towards the top of a component?
 
Rob Spoor
Sheriff
Posts: 20820
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, and not just in JPanels. This coordinate system, with (0,0) being the top-left corner, is used in all of AWT and Swing. It's also used to place windows (JFrame, JDialog, etc) on the desktop.
 
Benjamin Rohrer
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks very much! Just wanted to double check.
 
Rob Spoor
Sheriff
Posts: 20820
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're welcome.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!