Top "Jtextfield" questions

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

How to clear a string?

In a program I'm working on, a textfield has to display some text at some point. output.setText( outputString ); outputString = ""; …

java string jtextfield
JTextField Fixed Height

How do I get the JTextField to have a fixed height when the Frame is maximized? I want it to …

java swing size jtextfield
Swing JTextField how to remove the border?

Is there anyway to remove a border in a JTextField? txt = new JTextField(); txt.setBorder(null); // <-- this has …

java swing jtextfield
How to display a default message in JTextField java

I want to create a JTextField with a message inside as a deafult. But not as a proper text but …

java swing jtextfield
how to get value on TextField Java Swing

I have a simple Java Swing form with a JTextField, I get value on JTextField by getText() method but I …

java swing jtextfield
how add a listener for jtexfield when it changing?

I have a JTextField. I want to invoke a function when the text in it is changed. How do I …

java swing jtextfield
how to make a jtextfield having a fixed date format?

I'm having trouble creating a fixed date format using JTextField. Is there a way for JTextField to have a fixed …

java swing date jtextfield
Positioning components in Swing GUIs

I have some questions on positioning components and some questions on text fields and text areas (Java Swing). Any help …

java swing jtextfield layout-manager jtextarea
Java, Swing: how do I set the maximum width of a JTextField?

I'm writing a custom file selection component. In my UI, first the user clicks a button, which pops a JFileChooser; …

java swing jtextfield
Adding JTextField to a JPanel and showing them

I'm building a little app using Java and Swing in NetBeans. Using NetBeans design window, I created a JFrame with …

java swing jpanel jtextfield