Skip to content
Advertisement

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:

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

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.

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

Advertisement