I’m trying to create a login form using Java Swing. But I want the layout to look tighter, but still responsive. The structure of my project This is the picture of the GUI, this is not what I want: The components in the form panel are not behaving as I would expect, I want the fields to be close to
Tag: user-interface
When are validate(), invalidate() and the combination of both mandatory?
Summary In Swing there is the possibility of validating and invalidating JComponents. invalidate() marks a component-hierarchy as invalid and either it is then validated programmatically or implicitely validate() validates a component hierarchy, i.e. basically checks layout and ensures it is uptodate revalidate() does both and thus constitutes an explicit validate() call This information is aligned with what is said here:
How to extract information from Java stack as individual data types and use in method call
I am trying to implement an undo feature by creating a stack of 2 subtypes. I have a stack of parent type UserEntry holding two child types Assign and RelEntry. Assign and RelEntry is both classes used to insert values (number and relationship) into a grid table. There is a method call to insert the values into the table as
JTable becomes blank after executing update on table? [closed]
Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 2 years ago. Improve this question I am trying to write some software where when a user adds a
How can I assign a value to my GUI attributes from a custom object? [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 2 years ago. Improve this question I am trying to make a game similar to bitlife, and in my program the first scene is the main menu where it asks the
Is there a way to stack date and time vertically in Vaadins DateTimePicker component?
For choosing some values of different data types in my UI, I use Vaadin’s DateTimePicker introduced in 14.3.x. I am wondering if I can somehow position date and time input fields vertically instead of horizontally? See the picture: The DateTimePicker component is here simply to width horizontically. And I don’t have the option to make all other inputs like the
Java move GUI panel While loop
I have a panel. I want to move the panel, inside a while loop, to the left and then to the right, after pressing a button and until a certain condition is met. But for this question let’s say continuously. After it finishes an iteration, it doesn’t move left or right. I used repaint() and Thread.sleep(1000) but nothing shows up.
Waiting for a task inside a thread pool using SwingWorker java
I’m simulating multiple Tasks inside a thread – when all of them should report to a GUI. So I have a unique form that has 4 Panels inside which should reply and do different Tasks.. they should each keep pooling a database and reporting stuff to the GUI. In this example, I just made it to write numbers to a
How to make non-border arrow buttons with Java Swing?
I’m using Java Swing to make a UI and the idea is to make it look like the native OS (in this case, Windows). I’ve used: And everything is good so far, except for one little detail. I’m trying to use the arrow buttons to hide/show a JTextArea like the ones described in MS’s documentation, the ones with no border
How to create moveable JPanel using BorderLayout?
I want to create a GUI with a sliding Menu. The menu is one of three JPanels organized onto a JFrame with BorderLayout. The Menu in question is on the west side. How can I make it so that the menu can hold Textfields, JLabels, images etc. while having the ability to slide in and out? Answer This can be