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
6
votes
1 answer

JScrollPane - Smooth Scrolling

I have a JScrollPane with a moderately high block increment (125). I would like to apply smooth/slow scrolling to it so it doesn't jump (or skip) when scrolling. How can I do this? I was thinking of scrolling like Windows 8. Any help would be…
Ramus
  • 250
  • 1
  • 2
  • 10
6
votes
2 answers

jScrollPane setVisible doesn't work

I have a show button to show a JTable on click but the table is not visible. Note: when I remove the JScrollPane the code works properly but the header of the table is not shown, so any help please to make this code work properly without removing…
HADEV
  • 437
  • 8
  • 19
6
votes
2 answers

Make a custom JScrollBar using an image

So I use Java Swing to build the UI for my app and use custom images to replace the ugly Java ones, the custom images have a style and are very easy to integrate into Java Swing. Right now my problem is I need to use a JScrollBar with a JScrollPane…
Sammy Guergachi
  • 1,986
  • 4
  • 26
  • 52
6
votes
2 answers

How to make JScrollPane scroll 1 line per mouse wheel step?

I have a JScrollPane whose content pane is a JXList. When I use the mouse wheel on the list, the list steps three (3) items at a time. This also works for a table, regardless of row height. How can I change this so that - regardless of platform -…
xmjx
  • 1,163
  • 1
  • 7
  • 18
6
votes
4 answers

JScrollPane does not appear when using it on a JPanel

I have been trying for hours to find a way to solve the issue, but I had no luck with that. Here is a sample code: import java.awt.BorderLayout; import javax.swing.BoxLayout; import javax.swing.JButton; import javax.swing.JFrame; import…
Eng.Fouad
  • 115,165
  • 71
  • 313
  • 417
6
votes
3 answers

How to get the dimensions of the visible part of the JScrollPane-based window

This JScrollPane based window is a top part of the JSplitPane. getBounds(), getWidth(), getHeight() all return the full size of the window, including the invisible (scrollable) part. I want to know the dimensions of the visible part only.
Flot2011
  • 4,601
  • 3
  • 44
  • 61
6
votes
2 answers

Dynamically create jCheckBox and add to a jScrollPane

EDIT: Using the solutions presented below, I have changed the code to have a JPanel inside a JScrollPane. Using a JButton i add JCheckBoxes to the JPanel inside the JScrollPane. This was one problem solved, as the a JScrollPanecan only take one…
wmdvanzyl
  • 352
  • 2
  • 5
  • 17
5
votes
2 answers

jScrollPane scrolling on element drag

I am trying to scroll by highlighting text and dragging down. Now, as you are probably aware, this is standard, default behavior for a standard overflow: auto element, however I am trying to do it with some fancy scrollbars courtesy of jQuery…
5
votes
2 answers

Enabling scroll bars when JTextArea exceeds certain amount of lines

this is my first time using any StackExchange website, so let's see how it goes. So I've been making a 'local' chat program in Java, and was using a JTextField for chat input. But I wanted to allow for multiline chatting so I switched to JTextArea.…
Bradley Odell
  • 1,248
  • 2
  • 15
  • 28
5
votes
2 answers

How to reach at the end of the TextArea

Possible Duplicate: How to set AUTO-SCROLLING of JTextArea in Java GUI? I'm creating an application in which the user types the text in a TextField from which the text is appended to a TextArea when an actionPerformed. The TextArea is added on a…
Mohammad Faisal
  • 5,783
  • 15
  • 70
  • 117
5
votes
4 answers

Get shown component in JScrollPane

I have a JScrollPane containing a JPanel. I fill this JPanel with many buttons. Is there any possibility to get the currently shown buttons? I know I can access the children of a JPanel via jpanel.getComponents() but those are all components in this…
Leon
  • 87
  • 6
5
votes
1 answer

jQuery - jScrollPane with AJAX : mouse wheel not working

I haven't found any solution about my current problem yet: I can't make the mouse wheel work with the jScrollPane Plugin (for jQuery) on my website. For information, I use this plugin with AJAX (in the javascript file "fonctionsGenerales.js" -…
Corentin
  • 189
  • 1
  • 2
  • 13
5
votes
3 answers

How do I scroll JScrollPane viewport containing a JPanel to a specific location

I am trying to create a large game board that only part of it will be visible in the viewport and would like to be able to move the viewport around using the arrow keys to see the whole board. Right now I have a JScrollPane that contains a JPanel…
Heheas
  • 87
  • 1
  • 2
  • 9
5
votes
4 answers

NetBeans: how to add ScrollBar to JPanel

I am developing a small desktop application in NetBeans. On my UI, I place a JPanel and put a single JLabel on it. The content of this JLabel is generated dynamically, so if the content is very large then it goes out of screen.So is there any way in…
Jame
  • 21,150
  • 37
  • 80
  • 107
5
votes
1 answer

Java ScrollPane overlapping contents

I'm having what I am sure is very much a beginners problem with my JScrollPanes. The problem is that the vertical scrollbar overlaps the components within the enclosed panel (on the right hand side). It becomes a bit of a pain when the scrollbar…
miklatov
  • 63
  • 1
  • 8