I wrote this method: It is the method of a class extending JTextArea (yes, I know extending is suboptimal but I won’t need anything else for the intended application, at least not to my knowledge). It is supposed to check every character being entered into the JTextArea and send the message (the settext part) if the key being pressed is
Tag: user-interface
Achieve Unique Column Width for each Cell in Different Rows with a GridPane?
I am trying to model credit card data in JavaFx using a GridPane: My model contains 3 rows (Note: each field is comprised of label + text field): Row 1: First name and last name (4 fields) Row 2: Credit card number (2 fields) Row 3: Expiration date – month, year + CVV (6 fields) See screenshot below: I was
Launching a transparent activity on HomeScreen
So there is an activity containing a webview. On launch/click on App Icon it should launch activity with webview as dialog on the HomeScreen of the device. Is there a way to achieve this? Answer Yes, you can do it. Set the theme of MainActivity to Dialog, then you’ll achieve it. It works fine for me. Hope it can help
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
Setting the Color of the Title Bar with Netbeans Platform Application (FlatLaF)
I’m currently working on a Netbeans Platform application that uses com.formdev.flatlaf.FlatLightLaf as the Look and Feel. The application is using Java 11 and running under Windows 10. I would now like to change the color of the TitlePane. Changing the color of specific elements (like jPanels etc.) globally for the entire application can be done by changing properties within the
error in module-info.java file in javafx project
I have been using javaFX for a while now, but a day ago when I crated a new project I noticed that there is a new file created automatically with the name (module-info.java) in the default package, and I can not even delete it!!. the following code is written there: unfortunatily all lines has errors 1ST line : Syntax error
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 can i get specific column from csv file and put that items of column into jComboBox using java?
part of my code is here: i am pretty novice in Java and can’t do the thing that i want. for example i wanna get all items from 2. column and set them into ComboBox. I tried many things, searched many sites but failed. If somebody can help me i’d be much appreciated. here you can see my output: Answer
Java GUI – Progress bar doesn’t update until the async task is finished
I am using CompletableFuture to run a long running operation. Meanwhile, i use SwingWorker to update a progress bar with increments of 5. The progress bar doesn’t update until the asynchronous method is finished. I have also tried doing this operation on the EDT thread, but to no avail. What you are seeing is basically me trying to just do
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