0

hi i want to add Scroll Pane to JTable

JScrollPane jScrollPane = new JScrollPane(table);
    jScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
    jScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
    add(jScrollPane,BorderLayout.CENTER);

in the above code table is and Object of JTable with default model
i write above code but that code display the scrollbar but they dont work

1
Contributor
2
Replies
3
Views
6 Years
Discussion Span
Last Post by sj5536
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.