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
0
votes
2 answers

Limiting a JScrollPane's scroll range

I have a JTextArea wrapped in a JScrollPane, which I use to log my application's output. I'm using the default, plain font with a size of 9 for the text area, and the scroll pane's height is 48 px. This results in an even distribution of lines in…
Konstantin
  • 2,285
  • 3
  • 19
  • 23
0
votes
1 answer

sticking components onto a JScrollPane

I have a program that adds bunch of components to a JPanel (in JScrollbar). However, since it adds so many components, most of them don't fit into the visible area (Viewport). When everything loads and I start to scroll down, I notice that…
Karlovsky120
  • 5,718
  • 7
  • 30
  • 79
0
votes
2 answers

How to make an image Viewer in swing?

I am trying to make an image Viewer like the one shown in the figure below:- Before i can start i have following questions in mind :- How would i check for the number of images in the target folder so that i can iterate and include all the images…
Insane Coder
  • 6,859
  • 11
  • 62
  • 140
0
votes
2 answers

Why don't I see the horizontal scroll bar when I have set the policy to HORIZONTAL_SCROLLBAR_AS_NEEDED

I have added jTable inside the jScrollPane as : public Scenario_One() { initComponents(); jScrollPane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); …
Y.E.P
  • 1,107
  • 5
  • 18
  • 39
0
votes
1 answer

How to use JScrollBar zooming image?

I want to use JScrollBar to zoom in and zoom out images but it doesn't work. What's wrong with my code? import javax.swing.*; import java.awt.*; import java.awt.event.*; public class piczoominandout extends JFrame { public JScrollBar scroll; …
0
votes
1 answer

Linking a Java JScrollBar to a JTextArea/Custom positioning a JScrollBar (track and thumb)

I have created a JScrollbar (with a custom UI) and a JTextArea in a JScrollPane in a JPanel. I don't want to add the scrollbar as the scrollpane's horizontal scrollbar, because I want to be able to position it. I tried setting the model on the…
0
votes
1 answer

Make JScrollBar bigger

I'm getting crazy trying to make a bigger JScrollBar. I would like to do a larger knot and track... and the JScrollBar itself. I've found some code here to extend my own BasicScrollBarUI to change the colors, performance, image of the knot... but…
rolgalan
  • 1,541
  • 13
  • 31
0
votes
1 answer

moving / scrolling up and down on three JTable simultanously.

I have three different jtable on three diffenernt jscrollpane - one next to the other. I successfuly written some code that makes them all scroll together when I scroll the mouse wheel. I inherrited JScrollpane and overriden its…
Bick
  • 15,895
  • 44
  • 133
  • 231
-1
votes
2 answers

adding Scrollbar to each JPanel(if needed) from JFrame

// This is my codes for JFrame which is then connected to other Panels. public class startQuiz extends JFrame { private static final long serialVersionUID = 1L; private JPanel jContentPane = null; private JButton…
Naing Phyo
  • 1
  • 1
  • 2
-1
votes
1 answer

JScrollPane change the source of the vertical scrollbar

I have a JFrame that lets a user scroll through and view records from a database that looks like: where the labels never move and the info scrolls under them. My problem is that my user wants the scrollbar to look like the one on the far right…
WickedChester
  • 25
  • 1
  • 5
-1
votes
1 answer

Image as JScrollBar

I am working on a pixel art editor and I am having some problems with the JScrollBar. The problem is: I render a image on my scroll bar track but it stretches every time so I have to draw over 30 individual scroll bar track images and I was…
-1
votes
2 answers

using JPanels without JFrame

i was wondering is it possible to use JPanels without JFrames because i am making a program which is asking to write a failure report. And i am using JOptionpane for new window but every time i try to add a scroll bar to the textArea , it just…
Monveu
  • 1
  • 4
-1
votes
3 answers

How to get the text box to scroll

In my code i'm trying to make a scroll bar with the a text box. I got the text box but i can't get it to scroll. I keep looking up new solutions but none of them work. If you know what is wrong can you help me import javax.swing.JFrame; import…
-1
votes
1 answer

JScrollBar not functioning the way i want

so i have a scrollbar, a JTextPane and code to push text to the next line when it hits the edge, however there are several issues. The JScrollBar won't grow any further than a specific size, any text that extends greater than that is no longer…
tommy knocker
  • 261
  • 1
  • 6
  • 18
-1
votes
3 answers

JText Area expands as text is entered

Can anyone tell me why a scroll bar will not display in this piece of code ? Instead the text area just keeps expanding as i enter more and more text. JFrame displayframe = new JFrame("All Details"); displayframe.setLayout(new…
Jessicam93
  • 31
  • 6
1 2 3
17
18