Skip to content

Tag: swing

JList not behaving as I expected

I’m practicing with a JList which gets populated with random numbers as the “Add Numbers” button is being clicked, and I have run into a few issues I have not been able to fix. In the code below, I’ve placed a button to toggle the visibility state of the list but it turns out it does n…

Java Swing Application Window – Second Form showing empty

The first class or JFrame that displays just fine And now my second class.. I’m sorry I’m a complete noob, when I run the debugger it looks like Options Menu is constructing correctly, but then it just displays as the minimize, full screen and exit button and nothing else. It will also run perfect…

Java Swing Drawing A Rectangle [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 last year. Improve this question I&#8217…

How to change (add or subtract) the value of a JLabel?

I wish to add 100 EUR to a JLabel (500 EUR) with a JButton (***). Since I cannot add nor subtract an int value from a String, I don’t know what to do. GUI Answer How to change (add or subtract) the value of a JLabel? … Since I cannot add nor subtract an int value from a String, I