Results 1 to 2 of 2
-
How can i make this JScrollPane scroll horizontally?
There seems to be no options for this in netbeans IDE!
I have a table with too many columns to display, so the columns are getting squished as the table only fills the view of the ScrollPane. How do I make the table exceed the width of the ScrollPane so that the horizontal scrollbar will show up?
I tried to look this up on google but the tutorials are confusing me.
I tried to make things happen when the ScrollPane component is shown, like this:
:eek:Java Code:private void jScrollPane2ComponentShown(java.awt.event.ComponentEvent evt) { jScrollPane2.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED); jScrollPane2.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS); jScrollPane2.setViewportView(jTable1); jTable1.setSize(1000,jTable1.getHeight()); jScrollPane2.createHorizontalScrollBar(); }
-
Similar Threads
-
Moving Scroll in JScrollPane
By ayesh85 in forum AWT / SwingReplies: 0Last Post: 03-02-2011, 08:11 AM -
how to make JScrollpane not to fetch data while scrollbar is adjusting?
By saba in forum AWT / SwingReplies: 4Last Post: 01-21-2010, 05:46 PM -
I want the output to be apper HORIZONTALLY
By o0oNorao0o in forum New To JavaReplies: 8Last Post: 01-21-2010, 12:24 PM -
How to duplicat drawOval horizontally?
By ntagrafix in forum AWT / SwingReplies: 1Last Post: 12-03-2009, 09:37 PM -
jscrollpane scroll issues
By kumar_gemi in forum AWT / SwingReplies: 11Last Post: 09-30-2009, 08:33 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks