About 24,500,000 results
Open links in new tab
  1. How to Use Text Fields (The Java™ Tutorials - Oracle

    A text field is a basic text control that enables the user to type a small amount of text. When the user indicates that text entry is complete (usually by pressing Enter), the text field fires an …

  2. Java Swing | JTextField - GeeksforGeeks

    Dec 3, 2021 · JTextField(Document doc, String text, int columns): constructor that creates a textfield that uses the given text storage model and the given number of columns. Methods of …

  3. java - How to create a text box that user can input a large …

    JTextField is a lightweight component that allows the editing of a single line of text. (source) As it is a single-line component, whatever its size is the cursor will always be centered and will …

  4. java - Adding a Editable Text Box to a JFrame - Stack Overflow

    Jan 26, 2014 · Use a JTextField, which is a single-line "text area", or a JTextArea, which can handle multiple lines. Both work similarly. Here's a simple example with JTextField:

  5. Text Box in Java - Stack Overflow

    Feb 20, 2011 · Use a JTextField class; you need not create a new class. You may "wanna", but I'm arguing that there's no need to do it. The behavior you need doesn't reside in the …

  6. JTextField basic tutorial and examples - CodeJava.net

    How to use JTextField component in Java Swing programs: creating, setting text, tooltip, input focus, event listeners, text selection, etc.

  7. Using Text Components (The Java™ Tutorials - Oracle

    Swing text components display text and optionally allow the user to edit the text. Programs need text components for tasks ranging from the straightforward (enter a word and press Enter) to …

  8. Java JTextField - Tpoint Tech

    Oct 24, 2024 · JTextField is a Swing component in Java that allows users to input single-line text. It is essentially a blank space where users can type characters. It is commonly used in GUI …

  9. How to work with text fields in Swing - Educative

    A text field in Java Swing is a graphical user interface component that allows users to enter text. Swing offers the JTextField class, a subclass of JComponent , to construct and manage text …

  10. Create new JTextField - Java Code Geeks

    Nov 11, 2012 · Use new JTextField("Some text") to initialize the text field with some text. Use new JTextField(10) to set the default columns of the text field. Use new JTextField("some text", 3) …

  11. Some results have been removed
Refresh