Skip to main content

All Questions

Tagged with
1 vote
1 answer
69 views

JComponents "Popping Through" Other JPanel

I have been trying to search for similar issues regarding mine, but to no avail. I have a simple Java Program wherein I have a JLayeredPane with a BorderLayout containing three JPanels. Inside the ...
JkB's user avatar
  • 11
0 votes
1 answer
39 views

Java Swing GridBagLayout not working as expected when trying to add another JPanel with its own layout and labels as part of it

I have an assigment where I need to replicate an specific layout wth JavaSwing. I decided to use GridBagLayout since it seems really flexible but it isn't responding as expected when I try to add ...
Iago Páramo Parada's user avatar
0 votes
0 answers
39 views

Box layout unjustified preceding gap, how to fix? [duplicate]

In this example I use the Box class to organize components in a JPanel. My problem is the presence of an unjustified gap that shouldn't be there. Simply the text field should come at the beginning ...
Saleh Rezq's user avatar
0 votes
1 answer
74 views

How do set position of JPanel anywhere on screen

I need to have a number of JPanels, and I cannot position them where I want to as they either disappear as I try and change things like boundaries for example. Any help is appreciated Here is the code ...
Dylan Caughey's user avatar
0 votes
0 answers
27 views

The gridlayout vgap changes on its own, how can I make it always the same?

I am making a messaging app where a server and a client communicate with each other by sending messages. I have a main panel where the messages are printed, and it is set with gridlayout and put on a ...
damby's user avatar
  • 3
0 votes
1 answer
37 views

JButton only appears after hovered over, while using CardLayout for handeling scenes [duplicate]

I am trying to create a simple game in Java, but I got stuck on creating a system for handeling the different scenes and the trasitioning between them. These are my classes: The scene manager that ...
V07R0N's user avatar
  • 1
-1 votes
1 answer
47 views

Swing Layout with CardLayout

How can I have get the layout in picture ? Current issue I am facing is that I am able see the dropdown 1 and text box but I do not see the dropdown 2 and text box aligned to it displayed. private ...
Tanu's user avatar
  • 1,612
0 votes
1 answer
106 views

How make JFreeChart nicely resizable?

I wonder if it's possible to draw nicely some charts using JFreeChart & ChartPanel. When I increase window size I want the chart to fill-up the new space, using a GridBayLayout. But the text ...
Maël Le Monnier's user avatar
-1 votes
1 answer
65 views

layout of elemets in JFrame - java swing

I have a problem with dispositions of elements in frame. enter image description here First function is responsible for layout only first Panel with two JLabels and Button. I would like to have one ...
henry58's user avatar
-1 votes
1 answer
127 views

How to make a spoiler in Swing (and why a simple solution is not working)

I'm trying to make a spoiler effect in Swing (like <summary>/<details> tag in HTML). However, if I toggle setVisible() method, the height of my parent containers is not calculated ...
Alex654's user avatar
  • 31
-2 votes
2 answers
81 views

Can't display button

I can't display button and i don't know why Is there any way to fix it I want it to appear at the top in the far left import java.awt.event.*; import java.awt.*; import javax.swing.*; public class ...
Naofumi's user avatar
0 votes
3 answers
115 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 vote
0 answers
49 views

Stack resizable and fixed-size JLabels along each other on a JPanel

I am trying to fashion a custom-looking status-bar for a Swing desktop GUI. This status bar should have a resizable "field" attached to the left/west edge, with a number of fixed-size "...
Makaveli84's user avatar
-1 votes
1 answer
91 views

Searching for a suitable layout to arrange my components in java swing

I am trying to develop a GUI using swing in Java. I took a look at the different layouts but I wanted to know if there is some kind of layout that would allow multiple components in the centre of the ...
js ss's user avatar
  • 1
-2 votes
1 answer
45 views

How can I make this example with java GUI JFrame?

I want to make the tag (이름: 홍길동 학번: 1111111) looks like this, 이름: 홍길동 학번: 111111 but only I can make looks like this, 이름: 홍길동 학번: 111111 I made it to JLabel on SidePanel which extends JPanel. And \n ...
harriet99's user avatar

15 30 50 per page
1
2 3 4 5
89