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

All Questions

Tagged with
-2 votes
1 answer
40 views

ScrollBar is added from scrach but not in the middle of work - java swing frame

I don't know where the problem is, when the sample code is run alone and from scratch, the scrollbars are displayed correctly, but when we try to add them to a task area in the middle of a prepared ...
Ddll's user avatar
  • 95
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
0 votes
1 answer
300 views

Inner JScrollPane Inside a JScrollPane Is Not Working Properly

I'm trying to create a container with scrollbar and inside the container have two inner panel inside. Inside the top inner panel are also having another JScrollPane. But currently I'm facing the ...
user9054854's user avatar
0 votes
2 answers
62 views

Adding JButtons to Scrollpane

JAVA: I want to add some JButtons to an Scrollpane. The JButtons are the Chats (like in Skype). I want them in a list with 1 column only. The amount of groups / rows should be flexible. The size of ...
CodingTil's user avatar
  • 487
3 votes
2 answers
2k views

Java Swing - JScrollPane fit Viewport width to JScrollPane width

I have been trying to make the content of a JScrollPane shrink in width, eg. i have set the the HorizontalScrollBarPolicy to NEVER, but that just ends up in no ScrollBar appearing and the content not ...
Marcel's user avatar
  • 1,548
0 votes
0 answers
142 views

JTree inside JScrollPane inside JPanel inside JSplitPane

I am designing a swing java program, which has many "regions" in its window. All regions are first put inside a (chain of) JSplitPanes in order to be fully resizable. One of such elements is a JTree, ...
a346's user avatar
  • 1
0 votes
0 answers
28 views

Error with JLists in a GridBagLayout

I needed to add two JLists into a JScrollPane, so i added the two JLists into a JPanel and I set the JPanel as the viewport view of the JScrollPane. Now, the problem is that I want to make the two ...
Gianluca Bartalesi's user avatar
0 votes
1 answer
3k views

JScrollPane: Autoscroll in JPanel

I know there are a lot of questions similar to this one, but unfortunately they are all about auto scrolling a scrollBar inside of a TextArea. I use a JScrollPane to simulate a JList: I add small ...
Lory A's user avatar
  • 530
0 votes
2 answers
819 views

JTable width layout

I'm creating a GUI interface to interact with the database of a warehouse. The application needs to add items to the database, update them and show them. I have some tables in the database and for ...
ardayigit's user avatar
  • 167
1 vote
1 answer
309 views

Java layout when using JScrollPane

This is my code private static KeyEvent e; private static String text1 = null; private static String text = null; public fysikdel() { super("Fysikformler"); setSize(700, 502); ...
user avatar
0 votes
0 answers
48 views

How to scroll through my JPanel that has an absolute layout?

while (rs.next()) { if (c == 1) { fillResultPanel(textFieldIMEInumber.getText().trim()); } else { JTextField field = createOrderIDJTextField(panelChooseOrder, i); field.setText(rs.getInt(1)...
Vala Ahmeti's user avatar
0 votes
0 answers
311 views

Why is my JList/JScrollPane so small?

When I run my code the JList shows up but it's really small, and when I try to change its size it won't change size. What am I doing that's wrong? A lot of the GUI formatting is new to me. Thanks. ...
Sean G's user avatar
  • 351
0 votes
0 answers
51 views

I want to arrangement jpanel for 2 columns to container in jscrollpane

I want to arrangement jpanel for 2 colums to container in jscrollpane.. my source tree.addTreeSelectionListener(new TreeSelectionListener() { @Override public void valueChanged(...
ByeongminNa's user avatar
0 votes
1 answer
42 views

JScrollPane not getting larger when JLabels are added to panel

my problem is that although the scroll bar is appearing on the specific panel I want it to it's not extending as labels are added. I would like it to extend when the labels start going off the panel ...
user2233480's user avatar
0 votes
1 answer
78 views

Panel not scrolling to the next components when it's in a scrollpane

i made the panel implement scrollable as well so it can scroll easily it still does not work. here's a picture, and the jscrollpane that circulates a panel is in the middle : so when i try to ...
Shed's user avatar
  • 97

15 30 50 per page