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
9
votes
3 answers

Why is my JPanel inside a JScrollPane not scrolling?

I have a JPanel (yellow) placed in JScrollPane. When I enter some text in JTextPane, it resizes, but the vertical scrollbar is still not active. yelowPanel.getSize() returns the same value it was before.`(You can see it on redPanel). So how can I…
alaster
  • 3,821
  • 3
  • 24
  • 32
9
votes
2 answers

Dynamically Resize a JScrollPane?

I Have two files. One extends JFrame, and another Extends JPanel. Whenever I change the size of the frame, whether it be maximizing, dragging, whatever, i want the ScrollPane to fit itself to the current size of the frame. There's more to it,…
Nyx
  • 93
  • 1
  • 1
  • 4
9
votes
2 answers

How to force-refresh/repaint a JScrollPane?

I am adding lots of components (JPanels, JLabels etc.) into a JScrollPane programagically at the start of my program based on some stuff from a database. It seems that this procedure is too fast for the GUI(?), so the JScrollPane does not always…
Daniele Testa
  • 1,538
  • 3
  • 16
  • 34
9
votes
4 answers

JTextArea on JPanel inside JScrollPane does not resize properly

I'd like to achieve the following: +------------------Other container(s)-----------------+ | +------JScrollPane (vertical)-------+ | | | JTextField | | | | Box.createRigidArea (vertical) |…
Velth
  • 1,108
  • 3
  • 15
  • 29
9
votes
3 answers

How to scroll to a specific location in a JScrollPane

I have a JScrollPane which contains a JPanel which has large height, This large JPanel contain more Jpanels in it as in the image. Some of those panels contains a JLabel which I used to show titles. At the top, there are JLabels which have numbers…
Harsha
  • 3,548
  • 20
  • 52
  • 75
9
votes
3 answers

JScrollPane resize containing JPanel when scrollbars appear

I have a small problem when using JScrollPane in my Java application. I have a JScrollPane containing a JPanel. This JPanel is dynamically updated with buttons (vertically ordered) that can be of any width. The JPanel automatically adjusts its width…
dylan202
  • 349
  • 1
  • 3
  • 13
8
votes
3 answers

JList - use a vertical scrollbar instead of horizontal with a vertical wrap orientation?

I'm trying to place a JList inside of a JScrollPane and have it alphabetically list the entries in vertical columns like this: A D G B E H C F However when the JList runs out of space to display more entries, I'd like the JScrollPane to scroll…
Lockyer
  • 1,311
  • 1
  • 13
  • 30
8
votes
2 answers

How to hide the arrow buttons in a JScrollBar

I need to hide the arrow buttons of java.awt.Scrollbar(VERTICAL) in an AWT application. Does anyone know how this can be achieved? I saw an example here, but the code just hides the buttons. The vacant space for the buttons still remains; it is not…
tiger
  • 671
  • 2
  • 11
  • 30
8
votes
2 answers

Scroll a JScrollPane to a specific row on a JTable

Possible Duplicate: JTable Scrolling to a specified row index I have a JTable and I programmatically need to select a row by using this code: myTable.setRowSelectionInterval(i, j); (where i and j are valid row and column numbers…
David
  • 15,652
  • 26
  • 115
  • 156
8
votes
1 answer

Issue with full page horizontal scroll

Is any other alternative for full page scroll? example of full page scroll http://jscrollpane.kelvinluck.com/fullpage_scroll.html step-1 make window width smaller by clicking Restore down button. step-2 scroll to right step-3 now, make window width…
Array out of bound
  • 1,133
  • 7
  • 24
8
votes
4 answers

How to know if a JScrollBar has reached the bottom of the JScrollPane?

I'd like to know if there is a way to know when a JScrollBar (vertical in my case) has reached the bottom of his containing JScrollPane. At first i have though of using an AdjustmentListener on the scroll bar but i don't know how to interpret the…
nathan
  • 1,111
  • 3
  • 18
  • 33
8
votes
2 answers

how to change JTable Background Color default to white?

I have a JTable that I am displaying in a JScrollpane. The JTable only displays a few rows of information in its grid. The space below the grid to the bottom of the JPanel, that contains the JScrollpane, (Which in turn contains the JTable) is…
manav
  • 119
  • 1
  • 2
  • 9
8
votes
3 answers

Resizing issue with canvas within jscrollpane within jsplitpane

I'm creating an application using the NetBeans GUI Editor, in which I want to have a JSplitPane, the top component of which will be a Canvas within a JScrollPane and the bottom component will be a JTextArea, or something like that. When I pull the…
Sakis Vtdk
  • 489
  • 6
  • 12
7
votes
2 answers

Java: JScrollPane disable scrolling when ctrl is pressed

I want to disable scrolling with the mousewheel in my JScrollPane while ctrl is pressed. When you press ctrl and move the wheel you will zoom in/out AND also scroll the panel, which is not what I wanted. Here's the working code: scroller = new…
7
votes
3 answers

Java JScrollPane

I'm trying to add a Vertical scrolling my java programs textarea. I am using this code to create my JScrollPane: console = my textarea. I am also Declaring JScrollPane vertical; vertical = new JScrollPane(console); …
Duncan Palmer
  • 2,865
  • 11
  • 63
  • 91