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.

266 questions
2
votes
1 answer

JScrollPane with scroll arrows but no scrollbar

I want to create scrollpane like on this picture: With arrows on component sides and with no scrollbar visible. Only horizontal scrolling is needed. Can It be done with JScrollPane?
Marco
  • 582
  • 1
  • 6
  • 17
2
votes
2 answers

Simple way of creating an animated JScrollPane in Java?

I currently have a JScrollPane that holds what is basically a list of items. This JScrollPane is to be displayed on an information screen. What I'm looking for is some way of making it automatically scroll to the bottom of the list at a given…
2
votes
2 answers

JScrollPane Set Scroll Position

I have following code snippet query_area = new JTextArea(""); query_scroll_pane = new JScrollPane(query_area); query_scroll_pane.setSize(1000,80); query_scroll_pane.setLocation(10,10); query_panel.add(query_scroll_pane); which adds my textarea to…
aditya parikh
  • 595
  • 4
  • 11
  • 30
2
votes
1 answer

Limit JScrollPane to only show part of its content

I have a JScrollPane that contains a JPanel of size 5000x5000 pixels. I want to limit the JScrollPane to only be able to show a subpart of this JPanel. For example the rectangle defined by the two points (X,Y): (500,500) (upper left…
user1506145
  • 5,176
  • 11
  • 46
  • 75
2
votes
1 answer

Change background color of ScrollBar end buttons

In Java, I've been researching how to change background color of the buttons on the ends of a scroll bar. I haven't found a site that explained how and I've also looked through the UIManager Defaults to try to look for something, but I can't find…
Josh M
  • 11,611
  • 7
  • 39
  • 49
2
votes
3 answers

Size of «working» area in JScrollBar

How to define this size of JScrollBar in Swing?
Alexandr
  • 474
  • 7
  • 13
2
votes
1 answer

Attach jscrollbar to another component

In my application, I have two swing components on top of each other, that look something like this picture. The problem is that the orange component needs a vertical scrollbar, but I want the right edges of the components to stay exactly aligned…
Jeff Storey
  • 56,312
  • 72
  • 233
  • 406
2
votes
1 answer

Painting problems with custom ScrollPane

To keep order in my other question it was recommended to ask the following seperately: The following is the code of the test-class, in which I add my custom JScrollBar public class TestScrollBar { private static JFrame f; private…
Valentino Ru
  • 4,964
  • 12
  • 43
  • 78
2
votes
1 answer

Custom JScrollBar-Thumb is painted, but doesn't move

I decided to dive a little bit deeeper in the materia of swing and custom painting components. The last few days I read tons of articles, API-documentations and questions here on StackOverFlow and other forums. But still I got some basic problems in…
Valentino Ru
  • 4,964
  • 12
  • 43
  • 78
1
vote
1 answer

MouseListener for JScrollBar arrow buttons

http://s019.radikal.ru/i626/1203/ae/8420ef7757f7.png JScrollPane.getVerticalScrollBar().addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) { System.out.println("mouseClicked"); } …
user1221483
  • 431
  • 2
  • 7
  • 20
1
vote
1 answer

Adding horizontal scroll bar in JComboBox not working

I am trying to add horizontal scroll bar in a JComboBox using reference with thread - Horizontal scrollbar for JComboBox across multiple look and feel at the OTN, but it's not working in my case. How to add a horizontal scroll bar to JComboBox…
Ashish Pancholi
  • 4,569
  • 13
  • 50
  • 88
1
vote
1 answer

JScrollBar doesn't show the thumb

When I set visibleAmount of JScrollBar equal with maximum Value, the thumb of JScrollbar is disappear. I don't know why? and i want to make the scrollbar like that: [<][ --- ][>] (the size of thumb is full of JScrollbar).
Hoangdise
  • 29
  • 3
1
vote
2 answers

How to prevent JScrollBar from scrolling on certain events like page down?

I have a very large view of data. I want a scrollbar for the user, but I want to override the standard way that a scrollbar processes pressing the up and down arrows (or up and down keys on the keyboard), as well as clicking the track area which…
Matt Quigley
  • 7,614
  • 4
  • 25
  • 26
1
vote
0 answers

Move Java swing scrollbar to the left side

Possible Duplicate: Swing JScrollPane - how to set vertical scroll bar to left? How can I move the vertical ScrollBar in a javax.swing.JScrollPane to the left side of the window?
jonr
  • 1,133
  • 1
  • 11
  • 25
1
vote
0 answers

Dynamic JTable size by number of rows

I kept on searching and nothing shows a good answer, I'm a bit new to the in depth parts of Java, so just asking.. How to resize or dynamically resize the JTable depending on its rows, instead of having a vertical scrollbar? My method (not…