Questions tagged [jscrollbar]

JScrollBar is a Java Swing component to indicate the current position and the visible area size (by length of knob) if horizontal or vertical scrolling is involved so only part of the view is visible.

JScrollBar is a Java Swing component to indicate the current position and the visible area size (by the thumb length) if horizontal or vertical scrolling is involved so only part of the view is visible.

263 questions
4
votes
4 answers

Java: What is the difference between block increment and unit increment and what are these values used for?

What is the difference between block increment and unit increment and what are these two values used for? These two fields/values are used by the Adjustable class. This class includes these four methods: int getBlockIncrement(); int…
Tim Visée
  • 2,594
  • 4
  • 38
  • 47
4
votes
1 answer

Hide JScrollBar in a JScrollPane

Update : The second solution works perfectly but you have to be careful with the size of some of your object to not active default value for ScrollBar.You can't hide both you have to make a choice ;) I would like to hide the ScrollBar but still able…
g3r4n
  • 95
  • 1
  • 9
3
votes
3 answers

Java swing double buffering

i just started using double buffering and everything worked just fine until i wanted to add a JScrollPane to the screen so i later on can do some camera movements. Everything shows up fine (my sprites) EXCEPT the ScrollBars of the JScrollPane. And i…
Lucas Arrefelt
  • 3,749
  • 4
  • 37
  • 66
3
votes
1 answer

Force JScrollBar to scroll to line head

I am dealing with JEditorPane to display HTML documents and I created a button which scroll me to next view port every time I click it, "as if I am turning a page of a book". However, sometimes I see a part of a line at the top of the view port, so…
muaz
  • 368
  • 6
  • 10
3
votes
1 answer

Make JTable scrollable

I'm trying to create a JTable with 2 columns, one must show the name of the product, the second one, the price. The problem is that the JTable is very small, so i need a scroll, but i can't create it. DefaultTableModel model = new…
aerojun
  • 1,066
  • 2
  • 14
  • 27
3
votes
3 answers

Need help with logic of nested scrollpane

I need to make a "nested" scrollpane within another scrollpane and am looking for a bit of logic advice. Here is what I want to do - I'm going to use a 'digital cable television' analogy to make this easier since that's what it reminds me of. Think…
Lorne Schultz
  • 167
  • 1
  • 15
3
votes
2 answers

Smoother scrolling in a JScrollPane

Using a JScrollPane's scrollbar arrows to scroll (or by setting up key bindings for the arrow keys) moves the viewport one increment, pauses, then scrolls smoothly. Most scrollbars I've encountered behave the same; there's a slight movement, a…
bendicott
  • 370
  • 2
  • 17
3
votes
2 answers

JScrollBar don't show thumb in Nimbus L&F

I got a problem which only happens on Nimbus L&F. If there are too many items in a JList, the thumb of JScrollBar will disappear. But in metal L&F, the thumb will be always visible, because it has a min size. I have also checked the logic in Nimbus…
Alan
  • 33
  • 3
3
votes
3 answers

Can you make the background of a JScrollBar transparent?

I have a series of column labels that scrolls independently from the data that is displayed in a matrix below. I can make the whole scrollbar transparent except on hover. The labels are right up against the data, which I like, however, upon hover,…
hepcat72
  • 628
  • 3
  • 20
3
votes
1 answer

swing JTable with ScrollBar - color of square between headers and track

I have a JTable with BasicScrollBarUI, I set the headers background color: table.getTableHeader().setBackground(GuiConstants.backgroundColor); and the scrolbar background color: public class ScrollBarUI extends BasicScrollBarUI…
Danielle
  • 792
  • 7
  • 12
3
votes
3 answers

JPanel in JTabBar is not scrollable

enter code hereI am having the following problem. I am adding a two JPanels to one panel and add this finally to my TabbedPane. However, I want to make it scrollable, therefore I just make the Panel scrollable which just adds my scroller in the…
Carol.Kar
  • 4,830
  • 22
  • 98
  • 199
3
votes
3 answers

Find standard JScrollBar width or height

I'm trying to place a component on the corner of the window. However, my window has a scrollbar and the scrollbar is placed on top of the component. So I'm trying to change the position of the component so that it is adjacent to the scrollbar…
ThePrince
  • 603
  • 2
  • 9
  • 22
3
votes
1 answer

Why JScrollBar doesn't respond to arrow keystrokes when coexist with editable component?

(Things will be clear in the code after description) I have a program that contains JScrollBar, JTextArea, JTextFields, JButtons and some other things. (I only added SSCCE codes) OK, I added key bindings for left and right JButtons of the JScrollBar…
Saleh Feek
  • 1,948
  • 6
  • 32
  • 51
3
votes
2 answers

synchronize scrolling of N number of jtables in java swing

I have a requirement of having N number of tables arranged in a grid pane side by side provided height of the scrollpanes of all the jtables remains same. Now i want to synchronize scroll of all the jtables means if i scroll the first jtable then…
Sanket Pipariya
  • 79
  • 1
  • 12
3
votes
4 answers

Remove Arrows from Swing Scrollbar in JScrollPane

I would like to remove the scrollbar arrow buttons from a scrollbar in a JScrollPane. How would I do this?
asawilliams
  • 2,838
  • 2
  • 26
  • 53
1
2
3
17 18