Top "Jtextfield" questions

JTextField is a Java Swing component that allows the editing of a single line of text.

Inserting values from my TextField in Java into a database

I'm a newbie here and I would have one question that I'm having hard times getting an answer to. I …

java swing jtextfield sql-insert actionevent
JTextField only shows as a slit Using GridBagLayout, need help

Hi thank you in advance for any help, I'm trying to build a simple program to learn GUI's but when …

java user-interface jtextfield gridbaglayout
How can I get the length of a JTextField's contents as the user types?

JTextField has a keyTyped event but it seems that at the time it fires the contents of the cell have …

java swing events jtextfield
How to list suggestions to when typing inside the text field

Hi in my Java swing application I need to show all possible existing entries with same initial characters while user …

java swing autocomplete jtextfield autosuggest
How to set focus on specific JTextfield inside JOptionPane when created?

I want to set the focus on a specific JTextField which is passed to the JOptionPane as Object Message. Here …

java swing jtextfield setfocus
JTextField: How to limit the number of characters?

Please have a look at the following code. import java.awt.FlowLayout; import java.awt.GridLayout; import javax.swing.*; import …

java swing jtextfield
loop through JPanel

In order to initialize all JTextfFields on a JPanel when users click a "clear button", I need to loop through …

java swing loops jpanel jtextfield
JTextField not showing up in JPanel on launch

The JTextField is there because when I move the mouse over where it's supposed to be the mouse icon changes …

java swing jpanel jtextfield layout-manager
How to set size of JTextField in pixels

Hey I was just wondering if there is a way to set JTextField width for example 50% of the screen size. …

java swing user-interface jtextfield preferredsize
JFormattedTextField : input time duration value

I want to use a JFormattedTextField to allow the user to input time duration values into a form. Sample valid …

java time jtextfield duration jformattedtextfield