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

Destroy jScrollPane

How to remove jScrollPane using destroy. Please can you give a simple example for the following code: $(document).ready(function() { $(".div1").jScrollPane(); });
Some text...
shr3jn
  • 605
  • 1
  • 10
  • 21
7
votes
2 answers

jScrollPane dynamic content

i was trying to use the follow jquery plugin: http://jscrollpane.kelvinluck.com/dynamic_content.html but i'm still no success when i try to reinitialize the API I have a div (id=content) which receives the response from load() method (jquery),…
davi
  • 71
  • 1
  • 1
  • 2
7
votes
2 answers

Make a Java JScrollpane only scroll vertically

I would like my entire JFrame to vertically scroll. I have added the following code, but it only creates a horizontal scrollbar. frame.setContentPane(new JScrollPane(new GradeQuickResource())); I want to do the opposite. I ONLY want a vertical…
Philip McQuitty
  • 1,077
  • 9
  • 25
  • 36
7
votes
1 answer

jquery jScrollPane ipad issue

I am pulling my hair out with an scroll issue with iPad/iPhone... I am using the fantastic jScrollPane plugin which works a treat on desktop browsers but on iPad/iPhone the div doesnt scroll (to do with touch events or something?) I have tried all…
Adi
  • 4,034
  • 13
  • 56
  • 78
7
votes
3 answers

How to implement MouseWheelListener for JPanel without breaking its default implementation?

Simply; I have a JPanel inside a JScrollPane; As expected; JScrollPane by default listens to MouseWheelEvent so that scrolling is working well for when the wheel is rotating and while the cursor is hovering over the JPanel. But After that; I just…
Saleh Feek
  • 2,048
  • 8
  • 34
  • 56
7
votes
3 answers

Java - Transparent JScrollPane

I have a JTextArea and it's riding on top of a JScrollPane. Anyways, I know I can use the getViewPort() method to set the opaque property of the viewport, but I cannot seem to find any sign of how to do that anywhere. Here is what I have so far: if…
test
  • 17,706
  • 64
  • 171
  • 244
7
votes
1 answer

Smart JScrollPane autoscrolling

I am attempting to implmement smart autoscrolling on a JScrollPane containing a JTextPane. The JTextPane is used for logging my app in color. However I'm running into a wall trying to do smart autoscrolling. By smart autoscrolling I don't mean…
TheLQ
  • 14,830
  • 14
  • 69
  • 107
7
votes
1 answer

JScrollPane without scrollbars

I'm trying to use a JScrollPane to display a JPanel that might be too big for the containing Jpanel. I don't want to show the scrollbars (yes, this is questionable UI design, but it is my best guess of what the customer wants. We use the same idea…
Erik I
  • 972
  • 1
  • 11
  • 28
7
votes
1 answer

Changing the thumb color and background color of a JScrollPane?

I am having trouble styling a JScrollPane. I just want to be able to change the color of both the thumb and the background (and also remove the increase/decrease buttons). So far I have tried the following: this.setBackground(new Color(0,0,0)); …
user1270235
  • 359
  • 3
  • 4
  • 11
7
votes
3 answers

Zoomable JScrollPane - setViewPosition fails to update

I'm trying to code a zoom-able image in a JScrollPane. When the image is fully zoomed out it should be centered horizontally and vertically. When both scroll bars have appeared the zooming should always happen relative to the mouse coordinate, i.e.…
vincent
  • 1,953
  • 3
  • 18
  • 24
7
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,988
  • 4
  • 45
  • 55
7
votes
3 answers

Dynamically adding JTable to JScrollPane

I have a table that I want to populate when the user prompts me to do so. Problem is, I can't anticipate how many rows the table will end up having. In the constructor for my panel where the table will be displayed I have // add empty…
Matt
  • 295
  • 3
  • 6
  • 17
7
votes
1 answer

Corruption in uitable header when using setValue on the scrollbar

I am trying to create a table in MATLAB where I can change the scroll position programmatically. I created a uitable and extracted the handle of the Java UITablePeer object (designated here as htable). I then got the handle for the UIScrollbarPane…
eyl
  • 71
  • 1
7
votes
3 answers

Convert a JPanel to an image in a JScrollPane

I want to convert an JPanel to an image. I used the following method: public BufferedImage createImage(){ int w = getWidth(); int h = getHeight(); BufferedImage bi = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB); Graphics2D g…
Sameera Kumarasingha
  • 2,908
  • 3
  • 25
  • 41
7
votes
1 answer

How to check whether JComponent inside JScrollPane is visible to a user?

Imagine you have a JScrollPane and many JLabels or any other JComponents added to it. How would you check if a certain component is visible/partially visible/not visible to user? (scrolling) I have tried to Google but could not find an easy…
Nikolay Kuznetsov
  • 9,467
  • 12
  • 55
  • 101