Question « JTextField « Java Swing Q&A





1. Questions: controlling a Swing GUI from an external class and separating logic from user interface    stackoverflow.com

UPDATE: I'm using Netbeans and Matise and it's possible that it could be Matise causing the problems I describe below. UPDATE 2: Thanks to those who offered constructive suggestions. After rewriting the ...

2. JTextField question    coderanch.com

3. Question about JTextField    coderanch.com

4. Simple JTextField Question.........    coderanch.com

Hi, How can i add text to jtextfield in caps for example i have a jtextfield... My cap lock is off. So. i am running my program and when i type something in jTextField it shows as UPPERCASE... I would greatly appreciate if someone can some me a simple example..... Any help is greatly appreciated. Thanks in advance

5. JTextField Question    coderanch.com

I have a GUI app with somes JTextFields. The text displayed or entered in these fields really "butts up" against the left edge of the field border. I would like to introduce a slight margin, maybe just a couple pixels. Is that possible? I can't find it in my Swing docs. Thanks!

6. JTextField Question    coderanch.com

Hi , since you are trying to add the text of the two fields to the Object, the following might be your problem -> myList.add(new Object(field1, field2)); with that line you arent adding the text to the object - you are adding the TextField. shouldn't it rather be... myList.add(new Object(name,num)); This will be adding the text. Just a few questions.. - ...

7. Public JTextField question    java-forums.org

Hello, I'm trying to learn Java (the basics), but I'm having a problem the book does not explain well. It is about the following: Public JTextField variable (String JPanelText, String TextFieldText, int columns) (they call it columns in English, right? The size of the textfield) Basically, I need to make a JPanel + JTextField in one go instead of separately. The ...

8. JTextField question    java-forums.org

Hi. I'm making a program that, as of now, just adds, subtracts, multiplies, or divides two numbers. This is the code I have so far -- Java Code: public class Functions { public double add(double a, double b) { return a + b; } public double subtract(double a, double b) { return a - b; } public double multiply(double a, double ...

9. JTextField Question    java-forums.org

let me understand what you want. when they click it, you want to clear it? (mouseListener) when they press enter, you want it to clear?(keyListener) when they press delete, you want it to clear?(also keyListener) code: Java Code: import java.applet.*; import javax.swing.*; import java.awt.event.*; import java.awt.*; public class TextFieldTest extends JApplet implements KeyListener, MouseListener { JTextField field; public void init () ...





10. JTextField Question    java-forums.org

11. JTextfield question    java-forums.org

I am taking a graduate seminar that includes some Java programming. I am working on an assignment that has 2 text field boxes and a check box. The end goal is to save the data entered into a txt file. To approach this assignment, I am taking it piece by piece where I build upon the prior step. I decided my ...

12. newbie jtextfield question    java-forums.org

so, i'm trying for a user to enter number in jtextfields and then when they press jbutton to add...the program takes the 2 numbers entered and adds them up....my program actually somewhat works but i'm converting from text to double and then back to text to be able to print the number in jlabel. I need your help in simplifying the ...

13. Simple jTextField Question    forums.oracle.com

14. JTextField question    forums.oracle.com

15. JTextField question    forums.oracle.com

I'm trying to design a kind of form where you fill in your details such as name,email etc. Now to the problem. Everything seems to working, but when I've filled the form and hit my submit button and everything is inserted into the database, the information written into the form still remain in place. I was wondering if there's some kind ...

16. Palindrome problem- JTextField, Classes, and passing question    forums.oracle.com

That does help in terms of my understanding, but when I do that I seem to encounter a different problem. When I run it and enter a phrase once i click that button to check if it is a Palindrome it freezes at which point I have to force it closed. I wasn't having that issue before I revised the above ...





17. JTextField Question    forums.oracle.com

run: Exception in thread "main" java.lang.NullPointerException at IRMainForm.readDirectory(IRMainForm.java:154) at IRMainForm.main(IRMainForm.java:118) BUILD SUCCESSFUL (total time: 10 seconds) The string is holding the text I want to be displayed inside the JTextField. I have a string holding a location, "this\location\is\a\string\". I want to change the text inside the JTextField to that string while the program is running. Sorry I just realized it didn't ...