All Questions
Tagged with jscrollpane layout-manager
98
questions
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....
-2
votes
1
answer
344
views
Adding JScrollPane to a JFrame
I want to add JPanel containers to a JScrollPane and add this scroll pane to a JFrame. But when I add multiple panels to the scroll pane this happens. The gap between the scroll pane and the top bar ...
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 ...
0
votes
0
answers
41
views
How to add a JScrollPanel to previously added label components?
I'm having a little problem when
trying to add JScrollPanel to previously added components
with their bounds set specificaly in the for loop. The problem begins when I wanna add more than 15 ...
0
votes
1
answer
30
views
Unreliable Container width when using JScrollPane
I made a custom LayoutManager to render components in uniform squares in the space provided, and it does that by using the following method:
@Override
public void layoutContainer(Container ...
-1
votes
2
answers
49
views
Table header isn't shown in the table
I want to make a score board. I am using table to show the data. The data will show, but the table header won't show. I have checked with other article and I have also put the JScrollPane.
import ...
0
votes
2
answers
771
views
How to create a fluid 2-column GridLayout within a ScrollPane?
I have done tons of searching over the past two hours, and I've given up. The image below shows what I am trying to achieve (don't judge my drawing it's late and I made it in paint quickly):
...
1
vote
1
answer
56
views
Showing an unknown amount of JButtons in a JPanel with a fixed size
So I am doing a small Uno Game, and Swing seems to like kicking my butt. The problem I'm getting is when a player gets to see and choose which of his cards to put down. I have a given Panel with a ...
1
vote
2
answers
565
views
Add a scroll bar to text area
I use Eclipse Window Builder. When I click the button, something will be written on the screen. But since my prints are long, I want to use a scroll pane.
public class uyg2 extends JFrame {
private ...
1
vote
0
answers
62
views
Adding components, like buttons, onto others, like JTextAreas, in code is not appearing when I run
Below is a picture of the basic interface I want created. Everything works fine except for the following:-
The JScrollPane isn't appearing when I try inserting lots of text
in the InformationDisplay ...
0
votes
1
answer
361
views
How to add JPanel to JScrollPane?
I have added one JPanel to the JScrollPane. But the main panel is not scrolling. My problem is like this:
JPanel MainPanel = new JPanel();
MainPanel.setBounds(width/2,height/10,width/5,height/5);
...
1
vote
2
answers
48
views
Controlling downsize behaviour of ScrollPane within GridBagLayout
I'm experimenting with manipulating images in a GUI. I need to have an image shown in a GUI, with several other components around it. If the GUI window is resized, only the image area needs to resize ...
0
votes
1
answer
755
views
How to resize jscrollpane in jframe java swing?
i am new to java swing, currently i am developing an application using java swing, i am facing the problem is that when i populate my JList with JScrollPane it is displaying on my whole jframe.
code:
...
0
votes
0
answers
681
views
FlowLayout in Swing doesn't move to the next line
I'm using a flow layout inside a scroll panel. I keep adding button expecting them to add to the next line when there is no more available space, but they just keep adding.
I want the scroll bar to ...
0
votes
0
answers
70
views
how to increase JTable size in JFrame
Hi all I have an gui app that will display Contents of a csv that I read, the table will have 4 columns and multiple rows. I currently can see the first three then the rest will need to be scrolled ...