0

I am using the NetBeans 8.0 IDE to design a java desktop application. this is how the swing components are stacked in the application.

   JFrame
        |
        JPanel -- this has a card layout
              |
             updateScrollPane
                            |
                            UpdateJPanel -- free flow 
                                      |
                                     Table_ScrollPane 
                                                   |
                                                   jTabble

the issue is that the TableScrollPane does not scroll both vertically and horizontally. The scrollBarPo;icy used are As_Needed for both vertical and horizontal.

The vertical scrollng functions as expected but the vertical does not scroll.

any suggestion is welcomed,

Paul Samsotha
  • 205,037
  • 37
  • 486
  • 720
CodeAngel
  • 569
  • 1
  • 11
  • 31

1 Answers1

0

Use a JScrollPane and force its preferredSize to your given size (or set the scrollPane container LayoutManager to null and call setBounds() on the scrollpane). Also set the scrollbar policies.

Here is the similar case: Scrolling a JPanel

Community
  • 1
  • 1
Stanley Stein
  • 397
  • 1
  • 3
  • 17