Questions tagged [jscrollpane]

The tag jscrollpane could be used for questions about two topics: 1) a Java Swing component named JScrollPane, 2) a jQuery plugin. Please verify the companion tags to clarify the context of the question.

jScrollPane (jQuery plugin)

  • jScrollPane is a cross-browser jQuery plugin by Kelvin Luck which converts a browser's default scrollbars (on elements with a relevant overflow property) into an HTML structure which can be easily skinned with CSS. Project on GitHub.

JScrollPane (Java Swing component)

  • Provides a scrollable view of a lightweight component. A JScrollPane manages a viewport, optional vertical and horizontal scroll bars, and optional row and column heading viewports.
2703 questions
11
votes
3 answers

Scrollbars on JTextArea in a JScrollPane do not work

I'm having trouble getting a JTextArea to scroll. I'm not sure how you can mess up a JScrollPane but I seem to have and I just can't see it. It's all part of a larger project but the code below is how I'm creating a JTextArea and adding it to a…
Robert
  • 325
  • 1
  • 3
  • 12
11
votes
1 answer

How to implement jScroll?

Im a beginner in JS & jQuery so please bear with me. Im trying to create a dynamic list
    using JS and finally its working. Now i need to implement the infinite scrolling concept in my list, using jScroll plugin. So i researched a lot about…
Blaze Tama
  • 10,828
  • 13
  • 69
  • 129
11
votes
6 answers

JScrollPane Not Wide Enough When Vertical Scrollbar Appears

I have two JScrollPanes in the same window. The one on the left is large enough to display the contents of the contained panel. The one on the right is not large enough to display its contents and thus it needs to create a vertical scrollbar. But…
Thunderforge
  • 19,637
  • 18
  • 83
  • 130
11
votes
6 answers

How to make a JFrame scrollable in Java?

I have this code in which I am trying to fit a scrollable Panel (JPanel) but I don't get it. Here is my code: public class Sniffer_GUI extends JFrame { Canvas c = new Canvas(); ConnectorPropertiesPanel props; public Sniffer_GUI() { …
Joe Lewis
  • 948
  • 5
  • 18
  • 34
11
votes
4 answers

Swing: creating a JScrollPane that displays its component centered?

If you create a JScrollPane that has a viewport larger than the JScrollPane's component, it displays that component in the upper left. Is there any way to change this behavior so it displays the component centered? example program…
Jason S
  • 184,598
  • 164
  • 608
  • 970
10
votes
3 answers

Word wrap in JList items

I have a JList with very long item names that cause the horizontal scroll-bar to appear in scroll-pane. Is there anyway that I can word wrap so that the whole whole item name appears in 2 rows yet can be selected in one click? I.E it should still…
koool
  • 15,157
  • 11
  • 45
  • 60
10
votes
2 answers

stop horizontal scrolling in JTextArea

I want to add a JTextArea to an application. Normally that textarea contains large content and both horizontal and vertical ScrollBars appear when running that application. I want to remove horizontal scrolling; I have found that it is possible with…
Mad
  • 111
  • 1
  • 1
  • 4
10
votes
4 answers

jScrollPane 2.0 height problem in chrome

I am using a div with class scroll-pane (height 100%) within an absolute positioned div. The scroll-pane div contains some text first, followed by an image and followed by some text again. The image height is set to 200px. Problem is! If I view the…
markimark
  • 237
  • 1
  • 4
  • 15
10
votes
4 answers

How can I create a JTable where the first column is always in the JScrollPane viewport?

What's the best way to set up a table in a JScrollPane such that the first column is always on the screen in the same position regardless of horizontal scrolling and overlaps columns that pass underneath? When the scrollbar is at the farthest…
voodoogiant
  • 2,118
  • 6
  • 29
  • 49
10
votes
3 answers

JDesktopPane preferred size set by content

I have been trying to tame JDesktopPane to work nicely with a resizable GUI & a scroll pane, but am having some troubles doing so. It seems that unless the drag mode is outline, the desktop pane will not resize as expected (when an internal frame…
Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
10
votes
1 answer

Hide a column in JTable

Possible Duplicate: How to make a columns in JTable Invisible for Swing Java How to hide a particlar column in DefaultTableModel from displaying it in table? I am trying to enter data to three columns in JTable, but I want to show only two…
Adesh singh
  • 2,083
  • 9
  • 24
  • 36
10
votes
2 answers

JScrollPane - Zoom relative to mouse position

I need to calculate the new position of the viewport when zooming in to an image. The UI is built up as follows: ImagePanel draws the image ImagePanelWrapper is a JPanel wrapping around the imagePanel JScrollPane contains the…
maxdev
  • 2,491
  • 1
  • 25
  • 50
10
votes
2 answers

How to set Focus to the first row in a JTable which is inside a JScrollPane

I have a JTable inside a JScrollPane. I have put this inside a panel. As soon the panel loads I want the first row in the JTable to get the focus BUT by default the focus goes to the JScrollPane and on pressing tab the focus enters into table's…
Revathi Revu
  • 101
  • 1
  • 1
  • 3
10
votes
2 answers

How can I detect if a JScrollPane's scroll bar changes visibility?

I have JScrollPane that contains some images in a horizontal row. If the row of images is too long for the view port, the JScrollPane shows a scroll bar, reducing the height of the view port. I'd like to resize the images to fit the view port. How…
xmjx
  • 1,163
  • 1
  • 7
  • 18
10
votes
1 answer

Java - Scroll image by mouse dragging

I would like to make a join.me like in Java. I've made the screen capture part but now I want to scroll in the image by dragging the mouse. Here is a screen of what i've made: First of all, I want to replace the scroll bars by mouse dragging the…
Manitoba
  • 8,522
  • 11
  • 60
  • 122