Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
3 answers
112 views

Horizontal JScrollPane inside vertical JScrollPane

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 ...
IvanNaStackOF's user avatar
-1 votes
1 answer
59 views

Java Swing - JFrame GUI Elements made invisble on resize and open

I have a secondary JFrame for a settings panel, however, whenever it is opened or resized all elements inside it (a lot of textfields, sliders and so forth) go invisible. I can get the GUI elements ...
G. B. Wanscher's user avatar
1 vote
2 answers
319 views

How do I add a scrollbar to a JFrame with setLayout(null)?

I have some components which I need to use setBounds() on, hence the reason why I'm using the setLayout(null). But some of my components are out the window(below the Y-axis). I was wondering if there ...
MindHunter's user avatar
0 votes
1 answer
1k views

Java - IntelliJ - JList in JScrollPane

Hello, My first question on SOF. I've got problem with JScrollPane and JList. I've made class for list with getter to get list object package frontend; import javax.swing.*; public class ...
Paweł Zabawa's user avatar
1 vote
1 answer
126 views

How do I add a component in the upper-left of a JScrollPane?

I have created a JScrollPane with a RowHeaderView, a ColumnHeaderView and a ViewPortView. I added JPanels in diffrent colors and noticed, that there is one cornor left, on the upper-left where you ...
KaNaDa's user avatar
  • 141
1 vote
1 answer
457 views

How can I Resize a JScrollPane with JTable on it?

I created a JTable with some nice functions. My problem is, that it does not resize when I size the frame where it is on. Can someone help me with my Code so it does resize like it should? I alaready ...
KaNaDa's user avatar
  • 141
-2 votes
1 answer
111 views

Create an Instagram type feed using GridBagLayout & JScrollPane

How to create an Instagram type feed using GridBagLayout and JScrollPane in Swing? oki so i am trying to create a gallery kinda thing that looks similar to the instagram feed (three images side by ...
noobie's user avatar
  • 1
0 votes
0 answers
195 views

Trackpad scrolling doesn't work in JScrollPane

I'm trying to create a text editor, so I've created a JTextArea that expands into a JScrollPane. I'm running Windows 10 and java version "1.6.0_38" I am fairly new to javax.swing (I've only learned ...
Turismo98's user avatar
  • 159
0 votes
1 answer
749 views

JTextArea does not scroll automatically to most bottom line

So basically I have a JScrollPane which contains a JTextArea. public class Console extends JScrollPane { private JTextArea textArea = new JTextArea(); public Console() { super(); ...
Michael's user avatar
  • 815
1 vote
1 answer
2k views

Insert images into JScrollPane and JScrollPane into JFrame

I need a program that displays many images and I need window that can be scrolled for that. I read the documentation and searched on the forum but I still didn't manage to do it. I tried with ...
KON's user avatar
  • 91
3 votes
1 answer
154 views

scrollRectToVisible --> need effect on vertical line

I have JTable with two scrollbars (horizontal and vertical). When I use scrollRectToVisible, it return me Rectangle and this action cause that vertical and horizontal scrollbars automatically move to ...
mattipr's user avatar
  • 65
-1 votes
1 answer
149 views

Can't add JScrollPane to JTextArea

I've searched half the internet and I can't find anybody who has had this same problem. I've tried several different ways to add a vertical scroll bar, but in vain. Every other post I've seen ...
pjones235's user avatar
  • 540
0 votes
1 answer
792 views

Why Swing JScrollPane doesn't respond to mouse wheel?

I have the following Swing UI structure. When I scroll the mouse wheel within the blue JPanel, the JScrollPane doesn't respond to the mouse wheel event. Why? I read from the java doc that: ...
smwikipedia's user avatar
  • 63.4k
0 votes
2 answers
993 views

JTextArea scroll to bottom only if text is appended

I am trying to create a JTextArea which scrolls to bottom every time a text is appended to that text area. Otherwise, the user should be able to scroll top and see previous message. I used this code: ...
user avatar
0 votes
1 answer
45 views

JScrollPane prevents interaction with contents

I have a JScrollPane whose client is a Container with layout BoxLayout. Within the BoxLayout are multiple (dynamically generated) JPanels. However, the JScrollPane doesn't scroll (the scrollbars show ...
Luke Baumann's user avatar

15 30 50 per page