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
5
votes
2 answers

JTextPane + JScrollPane + word wrap?

Based on existing solutions, I haven't found a way to make a JTextPane (or JEditorPane) have either word-wrap or forced line-wrap inside a JScrollPane. JTextArea is not a solution as I need HTML to display in the particular input. output = new…
CosmoConsole
  • 81
  • 1
  • 5
5
votes
2 answers

How to implement JScrollPane child behavior?

It is said in manual, that if child does not implement Scrollable, then JScrollPane rely on preferredSize properties of it's content. Apparently this is not true for me. I am increasing preferred height, but JScrollPane does not feel or react on…
Dims
  • 47,675
  • 117
  • 331
  • 600
5
votes
2 answers

Access the JScrollpane in which the JTable is contained

I have a JTable inside a JScrollpane. I do not have access to the JScrollpane variable. But I have access to the JTable. Now how can I access the JScrollpane using the JTable. For Example -> mytable.getAncestor(...) or something?
Deval Khandelwal
  • 3,458
  • 1
  • 27
  • 38
5
votes
1 answer

How can you add several elements to a JScrollPane

So I am trying to add more than one element to a JScrollPane element but so far I haven't been able to pull it of. I can make it so that the first element shows up ,which in my case is a picture. But after adding in an extra panel to the…
BURNS
  • 711
  • 1
  • 9
  • 20
5
votes
1 answer

JTable row selection from the end

Happy New Year for everyone! :) I have a JTable inside JScrollPane (fillsViewportHeight is true) and want to enable row selection from the end when drag starts outside the table (as shown on the pic) SSCCE: public class SimpleTableDemo extends…
SeniorJD
  • 6,946
  • 4
  • 36
  • 53
5
votes
1 answer

How can I change the color of scroll bar

I have Task to change the color of scroll bar.For that I used the jscrollpane.By doing this only the browser scroll is changed.I want to change the color of the dropdown list also.How can I do this? html is
Nithin Viswanathan
  • 3,245
  • 7
  • 39
  • 84
5
votes
2 answers

JTable with autoresize, horizontal scrolling and shrinkable first column

I am having trouble creating a JTable with scrollbars. I want a JTable with 2 columns and no visible scrollbars. If I enlarge one of the columns the scrollbars should become visible and the columns resize. I followed this answer How to make JTable…
chillx
  • 53
  • 1
  • 4
5
votes
5 answers

I want a picture to stay in top left corner of a jscrollpane while scrolling

I have a JPanel in a JScrollpane. I draw on a BufferedImage, which I display on the JPanel. In the top left corner of the JScrollpane, I want a picture, that always stays in that corner when I scroll down to see the rest of my JPanel. Here the…
5
votes
3 answers

jscrollPane not working at all

I know I use a bad title but I can't describe it different. The code is here : http://jsfiddle.net/FFjgc/3/ Header :
mt0s
  • 5,781
  • 10
  • 42
  • 53
5
votes
2 answers

JPanel with grid painted on it, causing high CPU usage when scrolled

I have JSrollPane with a JPanel as the ViewPort component. On this JPanel I use paintComponent to draw a grid, of 64x64px squares. The JPanel is quite large, 28'672px by 14'336px, still the grid is drawn instantly and all seems fine. The problem is…
SLD
  • 63
  • 6
5
votes
1 answer

When is getPreferredScrollableViewportSize() called when laying out JScrollPane?

Implementing the Scrollable interface requires implementing the getPreferredScrollableViewportSize() method. This is typically done by just forwarding the call to getPreferredSize() - except when other parameters of the Scrollable may affect the…
ags
  • 719
  • 7
  • 23
5
votes
1 answer

How to speed up scrolling speed when dragging a JTree node inside of JScrollPane

I have a JTree in a JScrollPane. The JTree is rather long so it takes a while to drag a node from the top of the tree to the bottom. When dragging a node the JScrollPane scrolls, but not nearly as fast as it scrolls using the mouse wheel. …
ubiquibacon
  • 10,451
  • 28
  • 109
  • 179
5
votes
3 answers

Java JTable Column headers not showing

My code (Logic-wise) is all good, the only problem is that the column headers do not show up in the 2 tables (table and tableS, one for teacher and one for student details). How do I make them show? import javax.swing.*; import…
Matthew Cassar
  • 223
  • 2
  • 5
  • 13
5
votes
1 answer

jQuery jScrollPane Plugin IE 8 scroll is very slow with large data/content

jQuery jScrollPane Plugin in IE 8 scroll is loading and scrolling very slowly. It was same in IE 9 also, but since i have applied the fix mentioned in jScrollPane causes slow script warning it is working OK in IE 9 but in IE 8 the issue is still…
5
votes
1 answer

restrict JScrollPane view width

How can I restrict JScrollPanel view width? I do not want horizontal scroll to happen in any case. I tried to supply own JViewport but that does not help a lot. private static class WidthRestrictingViewport extends JViewport { private…
michael nesterenko
  • 14,222
  • 25
  • 114
  • 182