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

How to a add a vertical scroll bar to a JTextArea in Swing?

I have this Gui class: public class Gui extends JFrame implements ActionListener { /** * */ private static final long serialVersionUID = -384241835772507459L; JLabel playerInfo; JTextField textField; private final static String newline =…
Erik Balen
  • 275
  • 1
  • 4
  • 11
5
votes
4 answers

How to use jQuery jScrollPane and scrollTo plugins in the same script

I'm building my first js/jQuery site and I've run into a hiccup. I'm trying to use both jScrollpane (Kelvin Luck) and scrollTo (Ariel Flesler) plugins in one script. If I comment one out, the other works. Are they mutually exclusive? Do I need…
5
votes
1 answer

JTable inside JLayeredPane inside JScrollPane - how do you get it to work?

I want to put objects coming out of a JTable, layered on top of it, so using a JLayeredPane seems natural. However, getting this to paint properly, do the headers properly etc is very hard. How do I do this so that: The Row headers appear and match…
Nick Fortescue
  • 43,045
  • 26
  • 106
  • 134
5
votes
3 answers

jScrollPane: Remove scrollbar gutter?

I'd like to have the scrollbar place over the content instead of forcing a gutter beside it. In the attached image you can see what it currently does with the red scroll bar...it creates a vertical gutter that pushes the content to the side. But…
Shpigford
  • 24,748
  • 58
  • 163
  • 252
5
votes
3 answers

How to auto scroll to bottom in Java Swing

I have a simple JPanel with a JScrollPane (with vertical scrollbar as needed) on it. Things get added to (or removed from) the JPanel and when it goes beyond the bottom of the panel, I want the JScrollPane to scroll down to the bottom automatically…
pathikrit
  • 32,469
  • 37
  • 142
  • 221
5
votes
4 answers

Java scroll JScrollPane with JPanel within to bottom

I have a JScrollPane with a very high JPanel inside, that is changed dynamically, items being appended at its end. What I want, is to scroll to the bottom of aforementioned JScrollPane in order for the newly appended items to be visible instantly on…
arik
  • 28,170
  • 36
  • 100
  • 156
5
votes
2 answers

Back button not working in chrome

We are using jscrollpane to navigate through some divs when clicking a hash anchor (#). When the back button is clicked in Chrome, the url changes in the address bar but the browser does not navigate back to the div. In Firefox it does go back to…
Reuben
  • 2,701
  • 6
  • 31
  • 47
5
votes
4 answers

Line wrap in a JTextArea causes JScrollPane to missbehave with MiGLayout

I am having trouble with the same thing as this guy: MigLayout JTextArea is not shrinking when used with linewrap=true and I used the solution described in one of the answers; to set the minimum size explicitly. This works fine if one places the…
Datoraki
  • 1,223
  • 13
  • 26
5
votes
3 answers

Horizontal Bar on JScrollPane

I am using a JScrollPane to display a JTable. I want the columns in the table to have a minumum size, so that when you shrink the screen the horizontal scrolling appears; but I also want them to be able to expand when the screen gets wider. With the…
Sednus
  • 2,095
  • 1
  • 18
  • 35
5
votes
1 answer

Add JScrollPane to a JPanel

I have this interface to create. I have a problem with the JScrollPane: I declared a JPanel with a Gridlayout(8,1,0,2), I want 8 rows appear in this panel. A row is a JPanel to, I set the size to make the 8 row panels appear in the big panel. If…
Ali Ben Messaoud
  • 11,690
  • 8
  • 54
  • 87
5
votes
1 answer

JScrollPane - how does it display JTable headers?

What part of JScrollPane code is responsible for displaying the column headers of JTable? If you just add a JTable to a JPanel, it won't show the headers by default. You should either pass the table to JScrollPane's constructor or call JScrollPane…
user4205580
  • 564
  • 5
  • 25
5
votes
2 answers

How can one resize the scrollelements of a JComboBox?

I have a few JComboBoxes in my programm. I want to change the size of the scrollbar and the arrow button in the way that they are much wider. I need that because I want to use the programm on a Windows tablet and it is too small for a finger to work…
Nikita.M
  • 77
  • 1
  • 5
5
votes
2 answers

paintComponent() is drawing on other components

I'm using a custom class, based on the code in this answer, to draw a background shaped like a speech bubble. Whenever I resize the window of my application enough to make a component poke out at the top or bottom, the outlines of the said component…
Spitz
  • 79
  • 1
  • 3
  • 10
5
votes
4 answers

How to set jTextArea to have height that matches the size of a text it contains (to avoid scrollbars)

This problem looks trivial, but I can't find the solution. When I create a form it contains a JTextArea. I want to put large constant text in it. If the text is say 1000 lines long, I want my JTextArea to be 1000 lines high (to be large enough to…
celicni
  • 420
  • 3
  • 7
  • 16
5
votes
3 answers

JEditorPane inside JScrollPane not resizing as needed

I am implementing a Comment box facility in my application which user can resize using mouse. This comment box contains a scrollpane which instead contains a JEditorPane in which user can insert comment. I have added the editor pane inside a scroll…
sv_in
  • 13,929
  • 9
  • 34
  • 55