Forums Register Login

JPanel Coordinates

+Pie Number of slices to send: Send
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?
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
Thanks very much! Just wanted to double check.
+Pie Number of slices to send: Send
You're welcome.
Ew. You guys are ugly with a capital UG. Here, maybe this tiny ad can help:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 2804 times.
Similar Threads
Java Swing Code for image zoom in and out.
MouseMotionListener question
JTree resizing issue
MouseEvent
how to draw lines across components
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 03:20:52.