Reputation: 307
i have added multiple component on JPanel & then i add JPanel on JFrame.
how to make window scrollable ?
so i can add more component at that frame or window .
Upvotes: 4
Views: 15097
Reputation: 11937
Before adding your JPanel
, put in a JScrollPane
first:
JPanel panel = ...;
JScrollPane scroll = new JScrollPane(panel);
frame.add(scroll, ...);
Upvotes: 10
Reputation: 11911
Just putting your JPanel in a JScrollPane and adding this to the JFrame should do the trick....
Upvotes: 3