Good afternoon! It is necessary to make a list (vertical) from lists of events (horizontal). There are at least 2 problems: the area of the list of events (horizontal scrolling) expands beyond the borders of the panel. Apparently, the problem is with Layout, but I can not find the right combination; horizontal scrolling does not work (probably due to the
How to make JScrollPane dynamically scroll to the end after adding components?
Here is my code for the ScrollPane I tried to do getVerticalScrollbar.setValue(getVerticalScrollbar().getMaximum()) but it does not scroll to the end when I add JLabels to it. I’m trying to make it so that it will always scroll to the bottom of the screen once a new JLabel gets added to the panel. I din’t use JTextArea as I want each
Keeping a JScrollPane’s (JTextPane) scroll bar at the bottom when resizing text?
Very weird problem: I have a JTextPane within a JScrollPane, and a JSlider for resizing the text. If I increase the text size, the scroll bar moves up (normal). My goal is to keep the scroll bar at the bottom, if it was at the bottom before resizing the text. The weird thing is, I can ONLY get it to
Misaligned box in box layout when adding JScrollpane
I wanted to create a simple table with the some of the features of a JTable, but easier to style, so I created a couple of boxes in a box layout, one for the header and another to contain the cells. When I added the JScrollPane to the cell’s box, it indented the header box and now the don’t line
Problems removing and replacing components from JScrollPane [closed]
Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 1 year ago. Improve this question I am having problems changing JScrollPane components. I have an ArrayList named textFields
JTable not visible inside JScrollPane
I have a JTable inside a JScrollPane. I want to show the table only when a particular button is pressed otherwise it should not be shown. Inorder to incorporate that I have set the setVisible method of the ScrollPane to false while declaring and I set it to true inside the actionPerformed method of the JButton. But the JTable is
How do I enable a button after the scrollbar goes to the bottom?
So, I used a JScrollPane and then I added a JTextArea. I used textArea.setCaretPosition(0) to reset the scroll and it went at the top. All good, until I wanted to set a disabled Button on enable when the scrollbar reaches at the bottom. How can I do that? Answer You can listen for changes to the JScrollPane’s viewport, and compare
Container not displaying in JScrollPane
I have a JScrollPane that will fill up with buttons added by the user. Currently, the user creates a new button and it is added to the container that is inside the scroll pane but nothing is displayed….
JScrollPane doesn’t show up in JFrame
there. I’m writing a GUI chat client which sends message to the server and receives echoes from the server. The top half of the client JFrame contains a JTextArea wrapped in a JScrollPane which is placed under the menubar. This JScrollPane is responsible for receiving responses from the server which receives messages from a client and broadcast it out to
Java Swing JScrollPane not scrolling when shift held down and using mouse wheel
I have a simple Java Swing program defined below: The program consists of a simple JScrollPane with multiple buttons inside of it. Only vertical scrolling is enabled. It works fine. However, the problem is, when I am holding down the ‘shift’ key, vertical scrolling does not work when I am using the mouse wheel to scroll. Vertical scrolling only works