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
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,908
  • 2
  • 30
  • 54
3
votes
1 answer

What is the difference: getValueIsAdjusting() in both JScrollBar and AdjustmentEvent? + How to listen to the buttons of JScrollBar?

They are actually two questions: The First question: What is the difference between getValueIsAdjusting() in both JScrollBar and of AdjustmentEvent I tried them with some code to test if any difference, but I didn't get any!. Here is the code to…
Saleh Feek
  • 2,048
  • 8
  • 34
  • 56
3
votes
1 answer

java coloured scroll bar search result

How would I go about customizing a scroll bar in Java so that I could have a search that acts like chrome, that's to say puts coloured stripes where the results are? I don't want a library as I'd prefer to code it myself. Plus I don't want to loose…
xchiltonx
  • 1,946
  • 3
  • 20
  • 18
3
votes
1 answer

JScrollPane- Only Vertical Scroll?

I have the following line of code: JSplitPane VPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT,(new class1()),new JScrollPane(new class2())); I'd like class2 to ONLY have vertical scrolling please? Since my layout falls to bits otherwise. I am…
Jay
  • 2,107
  • 4
  • 20
  • 24
3
votes
1 answer

Scrollable JTable: dispalying vertical scrollbar from the header level

I have a scrollable JTable, with vertical scrollbar showed always. I need to move it, so it would start from where header does. How can I do this? Screenshot clears the situation.
Natalia
  • 783
  • 7
  • 18
3
votes
3 answers

I'm having trouble getting JScrollPanes to actually display scroll bars

I've found some examples scattered around the internet involving getting an image or a textbox to display scroll bars, but they all involve a program that basically displays its entire contents in a scroll pane. What I need to get it to do is stick…
user1299656
  • 630
  • 1
  • 9
  • 15
3
votes
3 answers

mouse wheel listener not working in jscrollbar

I am developing a desktop application in netbeans platform (netbeans module) in which i have a desktoppane and a jscrollbar. i have implemented MouseWheelListener and added scrollBar.addMouseWheelListener(this); in the constructor of the class.…
Hemant Metalia
  • 29,730
  • 18
  • 72
  • 91
3
votes
0 answers

MigLayout and JTables within JScrollPanes within tabbed pages

I submit the following implemented component in the spirit of giving back. The component satisfies my client's requirements, so I am not begging for help per se. But the component provides interesting functionality that might be useful to…
nferguso
  • 91
  • 5
2
votes
2 answers

adding JScrollBar to a JPanel with GridBagLayout

My whole purpose of this is to get something looking like this: I want my skills list to scroll similar to freezing the top row of your spreadsheet in excel. Here is the code for my top row. //#### Skills frame start #### skillsFrame = new…
KisnardOnline
  • 653
  • 4
  • 16
  • 42
2
votes
2 answers

How to change the Thumb of the JScrollbar to a custom image

Say I have an appropriately sized image inside an Image() I want to change the Thumb or Knob of the JScrollBar component to be this image. I know I need to subclass the ScrollBarUI Here is where I am at right now. public class aScrollBar extends…
Sammy Guergachi
  • 1,986
  • 4
  • 26
  • 52
2
votes
2 answers

Java - How can I change a JScrollBar's buttons dynamically?

I've overridden BasicScrollBarUI, but I don't know how to change the buttons after they've been created. How could I do this? Thanks.
rtheunissen
  • 7,347
  • 5
  • 34
  • 65
2
votes
0 answers

JToolbar added to JScrollPane will scroll when I put focus on a JButton on a Toolbar

How do I avoid having the JScrollPane scroll that has a JToolbar added to it that has buttons when I have already scrolled to where I want to go? If I move my mouse over a Jbutton on the toolbar (I disabled the scrollpane scrollbars and disabled…
Tony Anecito
  • 347
  • 2
  • 13
2
votes
2 answers

How can I make JScrollBar take a long values in the constructor?

So there is a constructor for JScrollBar that looks like: public JScrollBar(int orientation, int value, int extent, int min, int max) For my implementation of JScrollBar I need to have the int values be long since the size of my data can be over…
Grammin
  • 11,808
  • 22
  • 80
  • 138
2
votes
2 answers

Change the background slowly while scrolling

I'm trying to create a small program, that I want to change the background slowly while scrolling the scrollbar (JScrollPane). It's like onscroll function in Javascript. I created the scroll pane and added to it a frame then put some components in…
Mohamed
  • 83
  • 7
1 2
3
17 18