Java uses layout managers to lay out components in a consistent manner across all windowing platforms. Since Java’s layout managers aren’t tied to absolute sizing and positioning, they are able to accommodate platform-specific differences among windowing systems.
Learning java online is fun. Java is not platform dependent, so they can accommodate platform-specific differences. There are many learning center who are providing free online java tutoring. You can join any of them for more better understanding.