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
2,712
questions
-1
votes
0
answers
32
views
Adding margin to the panel inside a JScrollPane
I have a panel with a BoxLayout layout and I want this panel to have a scrollbar, so I made a JScrollPane. But when I use JScrollPane, the emptyBorder that I add is not added to my panel
JPanel panel =...
0
votes
1
answer
40
views
Scrollbar not getting created/ table not shown
I'm writing a program where there is a JTable to be created (Which I'm able to). But I want to add a scroll bar to it. Below is my code.
import java.awt.event.ActionEvent;
import java.awt.event....
1
vote
2
answers
66
views
Java JSCrollPane won't resize below minimum size of JButton with text
I'm trying put a JPanel (GridLayout 0, 1) with JButtons it, within the ViewPort of a JScrollPane. This is easy enough to do, but it doesn't behave "properly" when resizing the parent JFrame....
7
votes
4
answers
15k
views
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 ...
1
vote
2
answers
1k
views
Java table in table with auto resize
I want to make a table which can contain small tables and supports resize.
My solution use a JScrollpane which contains the table and the gridbaglayout contains the row which is a JPanel and this row ...
0
votes
2
answers
68
views
Component not visible after using "setVisible(true)" on it and its parent
I've got a Java 8 app with a couple of JTextFields and a JButton to log into a database and a JTextArea inside a JScrollPane to display errors. Both the textarea and the scrollpane have to be hidden (...
0
votes
1
answer
62
views
Java/Swing: Can't get JScrollPane to show entire element
The goal is to draw a bunch of circles (each a separate JComponent instance) onto a JPanel, and to be able to scroll far enough in any direction to see all of them.
Here is the "main" code:
...
0
votes
2
answers
80
views
Create a list of JCheckBoxes and put them into a JScollPane (UR Robot - URCap)
It has been a while since I programmed with Java Swing, so I'm not an expert with all it's methods. Just to contextualize what I'm doing, I'm building an URCap UI that I'm using in a UR Cobot (That's ...
0
votes
1
answer
24
views
Java/Swing: How to combine both - fixed size and ability to scroll - for JScrollPane including JTextArea
So I have created a JTextArea (in my case TextArea - to override append and setText methods that include line breaks), to visualise end user what is going on at what time.
I have:
limited space
...
0
votes
1
answer
25
views
How to put image in a scroll pane in the upper left
I am displaying an image in a scroll pane and it works great when the pane is smaller than the image. When the pane is larger then the image, the image is centered vertically and left justified ...
1
vote
2
answers
3k
views
How to get max scroll height in jScrollPane?
jScrollPane is an awesome jQuery plugin that modifies the default browser scroll bars. I am developing a chat application that will use jScrollPane. It works great so far except for the fact that I ...
0
votes
0
answers
34
views
How to make a FlowLayout JPanel nested inside a ScrollPanel go down the next row when reaching a fixed width [duplicate]
I have a JPanel with a FlowLayout inside of a viewPort of a JScrollPane. I can add components dinamically to this JPanel but when I reach the end of the JScrollPane what i want is for the components ...
4
votes
1
answer
227
views
Properly overriding getPreferredScrollableViewportSize
I have a JTable inside a JScrollPane, and I'm overriding getPreferredScrollableViewportSize in order to fit the JScrollPane to a fixed number of table rows, allowing scrollbars to appear when needed.
...
0
votes
0
answers
48
views
Zoom to Point with JScrollPane
I found a few questions similar to the one I have, including this and this, but none that really answered the problem, and it's because I am using a JScrollPane. I found the code necessary for the ...
-2
votes
1
answer
54
views
Jscrollpane isn't scrolling
Here's the code I have for my GUI
public class gui extends JFrame{
JFrame mainF;
JPanel listPanel;
JTextArea jtArea;
ButtonGroup buttons;
ButtonGroup restoreButtons;
JRadioButton createButton;
...