Java - Sliding Menu

Asked

Viewed 44 times

0

Good morning,

How do I make my menu manageable? I’ve been reigning a little bit more than I know how to do in jFrame. Could someone guide me? Thank you very much!

inserir a descrição da imagem aqui

1 answer

1


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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.