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 not work unless the
Tag: swing
My problem is when I press the clear button, it just clears the textfield and not data of the previous numbers pressed
The task here is to make a Java program that is like a pincode process. I just have a problem with the process of clearing since when I press the clear button, it actually clears the textfield but when I press new numbers, the numbers I typed before even after pressing clear still shows up Please help me with my
Why is JScrollpane not added to JTextArea in my TextEditor?
I can’t understand why the JScrollpane won’t be added to JTextArea, is this because of some sort of layout problem? This is a text editor made by my friend, he initially made it with only AWT but I then replaced AWT TextArea with swing’s JTextArea to wrap text. Output: Edit: Thanks everyone who invested their time for me. I figured
Converting line and column coordinate to a caret position for a JSON debugger
I am building a small Java utility (using Jackson) to catch errors in Java files, and one part of it is a text area, in which you might paste some JSON context and it will tell you the line and column where it’s found it: I am using the error message to take out the line and column as a
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 perfectly fine independently if I run it
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’m trying to make a simple app that visualised sorting algorithms, but have gotten
Text cursor is invisible when editing a JTable cell
The problem is that I have to click on the cell by mouse so that the text cursor is visible (after the cell get focused). I can still edit the cell even if the text cursor is invisible. When I try to get a cell focused through a keyboard key like Tab or Arrow then there’s no chance the text
When using JOption Pane, During Cancelled JOption Pane, NullPointerException occurs
I have data in jTable1. I attempted to send them to jTable2 , after calculating by value entered to JOption Pane. But when I clicked on cancelled button on JOption Pane program making error. Line 80 in my code is I need help to solve this problem. Thanks in advance. Code is shown below Stack Trace shown below Answer I
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
Why it will still appear “Incorrect account or password or user type” after I login successful? [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 1 year ago. Improve this question I’ve tried but just can’t figure out why, thanks for helping if there