How to make a bigger screen then as seen

Clash Royale CLAN TAG#URR8PPPHow to make a bigger screen then as seen
So, this will sound confusing, but how can I code in Java with JFrame to make the background appear to move when you go near an edge?
An example is Starve.io when the user can go left and continue going left even though you cannot see it on the computer screen.
Sorry, I am a very beginner programmer, thanks!
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.