Unfortunately, I cannot turn on .setEnable() for a JTextField, or a JTextField (tried both). It keeps remaining gray, so users cannot type. Please help me out. Details: taTwo can be either a JTextField or JTextArea but any I try cannot be enabled. It should be disabled for A but should be enabled for B, so if user choose A he/she
Tag: user-interface
How to create an array with random numbers and send it to listener without randomizing it again?
So i’m trying to create a program that create an array of 100 random numbers (without changing everytime user reacts to it), and allow users to check the numbers by entering the index of it. However, the array keep randomizing everytime the user pressed the Show Element button. I also tried to create the array on the main program, but
Trying to figure out how to print what user picks from this GUI code on to another GUI
Trying to figure out how to print what the user picks from this GUI onto another GUI and make it look like an airline ticket or receipt. I’m pretty sure I can design the airline ticket GUI. I’m having trouble coming up with code that would take whatever the user inputs and picks from the GUI code below and print
How Can I make a windows to pop up from the bottom of the screen?
I have a Map, with markers on the Gas Stations around my location. When I click on them, I want a window to raise from the bottom of the screen (and go only half through the Map Screen) where I want to display info about that gas station. How do I do this window coming from the bottom of the
Java predator-prey simulation with GUI can’t run simulation properly
I’m trying to add a GUI to the predator-prey simulation. It can allow users to choose which simulation(species involved) they want to do, set the simulation field size they want, and show the progress of the simulation and result. I asked a question before, and I kinda figure it out what caused the problem. But now I encounter another question:
How do I align a JPanel centered underneath another JPanel?
I have the following GUI that I’m working on. panel1 contains the titel and titelInput . At the moment I am setting the BorderLayout of panel1 to BorderLayout.NORTH and panel2 to BorderLayout.CENTER to see if it is possible to see both (which it is not). As far as I know, panel2 overlays panel1 because BorderLayout is always centered in the
JTable becomes blank after executing update on table? [closed]
I am trying to write some software where when a user adds a new entry to a SQL database, my JTable showing the entries in the database updates. Currently, when the method updateTable(Object[][] data) …
How can I assign a value to my GUI attributes from a custom object? [closed]
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 user to enter firstname (textbox), lastname (textbox) and choose a gender (choicebox)…
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 …
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 …