All Questions
126 questions
0
votes
1
answer
56
views
JFrame size affecting JButton size but only vertically?
I am confused about how JFrame extends the JButton vertically to match JFrame min size but not horizontally. I would like for it to not extend in either direction and know why it extends or doesn't.
...
-4
votes
1
answer
254
views
How to get container components according to layout?
I'm having two different issues during working with GUI.
The first one is: how can i get container components? I want to get 5 components from BorderLayout (and prefer to get them with knowledge of ...
0
votes
1
answer
108
views
Drawing graphics on a panel
I am trying to draw graphics on panels, but I am not sure how I would go about doing that.
I have tried creating a class that extends the JPanel and overrided paintComponent, and some other methods, ...
0
votes
1
answer
34
views
How to make this layout using JFrame
I'd like to make this layout using JFrame, is it possible ?
Thank you
0
votes
1
answer
304
views
How to remove blank space between image and text inside the JPanel?
I'm trying to develop a little application for my Java class. I'm using jsoup to get information from an URL.
I finally got everything, but I don't know how to remove this huge blank between the ...
0
votes
1
answer
57
views
How to fill JFrame window with a JPanel?
I am trying to set a JPanel fill the whole window of a JFrame. The layout of JPanel is GridBagLayout. If i change it to BorderLayout it works. But i need the GridBagLayout and in this way the JPanel ...
0
votes
1
answer
187
views
How to stack text fields vertically on a Panel?
I am working on the little GUI GPA calculation program. I set up my button so that once it's clicked some text fields and comboboxes will be added to a panel, but everytime when it's clicked, all the ...
0
votes
1
answer
6k
views
Java GUI Best way to create a table of JTables?
[UPDATE!!!!]
This is the finish product:
: )
So I am working on a program that helps me organize and print seatings for dinner. I have a student class with instance variables of their FirstName, ...
0
votes
1
answer
1k
views
How to keep JPanel from inheriting the size of its container JFrame
I've create a JFrame named homeWindowFrame and set its size to (600, 500) and then I added a JPanel named mainContainerPanel to the JFrame. I set a new size to JPanel but it's not working. JPanel size ...
0
votes
1
answer
56
views
Put component inside the smaller one
I wanna get Frame(640x640) with DrawCanvas(960x960) inside like this:
So the part of DrawCanvas must be hidden and frame centered. What layout should I choose? Now I put DrawCanvas inside the frame ...
-2
votes
3
answers
1k
views
How can I display multiple JPanel's from different classes onto my JFrame?
I will have a menu bar in which I can select multiple choices, in which will display a different JPanel for me onto my JFrame. Whenever I choose another option from my menu bar, a different JPanel ...
-1
votes
1
answer
158
views
What are Java resizable Layout Managers please?
I would like to resize my JFrame layout manager (actually Border Layout)
so I used setPreferredSize but nothing happens ? And some people told me to use another Layout Manager, so what Layout Manager ...
-2
votes
1
answer
92
views
Java - Switching between JPanels with their own JPanels and resizing these inner JPanels and components depending on JFrame size
I am making program in Java where I have some JPanels with different layouts and I want to switch between them. On these JPanels I have another JPanels with other components (like JButtons and JLabels)...
0
votes
0
answers
54
views
How to define the position that I want to my JButton on top of a background image?
I have a small frame that I created and I wanted to give it an image as a background, but when I did that I tried to work with boxlayout to define the positons of the buttons.
But it was a disaster ...
1
vote
1
answer
421
views
Placing JLabel, JButton etc. in JFrame
at the begginning i want to say im Polish guy, so sorry if my english will be bad... and my code have polish names.
I am doing calculator in active window, but i have many issues and i can not solve ...