title: Displaying a JTable without vertical and horizontal scroll bars but showing all the rows and columns
body: <p>This is what I have : a Jframe consisting of a JTabbedPane ( besides other elements). The JTabbedPane contains a JScrollPane as one of its tabs. The JScrollPane has a JPanel. Within the JPanel, a number of JLabel's and JTable's are to be displayed. I have created the GUI using NetBeans drag and drop Swing editor.</p>
  
  <p>Each of the JTable is contained within a JScrollPane. ( which the IDE has inserted ) Right now, the height of the JTable is fixed. So, if the number of elements are less, empty space is displayed within the JScrollPane. If the number of elements are more, the user needs to scroll the JScrollPane which contains the JTable. The same is the case with horizontal scroll of the JTable. If the window is maximized, the JTable's width also increases to occupy the entire available area. Is it possible to modify the GUI so that the height of the JScrollPane becomes as large as necessary to display all the rows of the JTable without scrolling? And the width of the JTable should be as large as required to show the contents without horizontal scroll. If the number of columns in the JTable's are too many or if the number of elements ( JTable's and JLabel's ) in the JPanel ( of the JScrollPane of JTabbedPane ) are too many, then the scrolling through items will be done through the scrollbar of the JScrollPane ( of the JTabbedPane )</p>