What is the general way to make side scrollers in java?
Not sure exactly what you mean but you could place your components within a JScrollPane which will give you scrollbars.
Side scrollers in the likes of Super Mario Bros but different.
This is a very broad question, so I'll give you a very broad answer: The concept behind scrolling platform game is called a "Tile map" Once you understand that concept (and how either to implement it yourself or to choose a library that already does it) you can find info on "scrolling tile maps" and what needs to be done to adapt an existing tile engine (or to choose one that already supports scrolling). The concept does not depend on any particular programming language as long as it supports drawing to the screen somehow. For low-level games support (vaguely similar to the idea of DirectX) for Java LWJGL is a good start (Minecraft was done with it) if you want to write the tile engine part yourself (but not the "tell the operating system to draw tiles where I want them" etc. part).
Here's an example in C, which should give you the basic idea. http://www.gamedev.net/page/resources/_/technical/game-programming/smooth-scrolling-a-tile-map-r743
Join our real-time social learning platform and learn together with your friends!