0
Good morning Junior
It is possible using a Jscrollpane, add one or more Component(s) to it and then add it to the frame you are using, be it a Jframe or another.
Ex:
public class Exemplo {
public static void main(String[] args) {
JFrame jFrame = new JFrame();
JPanel jPanel = new JPanel(); //component
JScrollPane pane = new JScrollPane(jPanel);
jFrame.setContentPane(pane);
}
}
Here it is possible to find other examples https://docs.oracle.com/javase/tutorial/uiswing/examples/components/index.html#ScrollDemo