1. Limiting Textfields in Java stackoverflow.comIs there a way to limit a textfield to only allow numbers 0-100, thereby excluding letters, symbols and such as well? I have found a way, but it is way more ... |
2. How to set the textfield is not visible in frame stackoverflow.comI am using Swing framework, and I have one question.
The Address panel is dynamically added to the main frame. I want to call the |
3. cant create a JTextField stackoverflow.com
|
4. How to define an arbitrary math function from the GUI textfield?? forums.netbeans.orgDear Sirs, I would be very grateful if you could advise in the following problem. I need that an arbitrary function, say f(x)=x^2+sin(x), was entered in the GUI textfield and then this function could be placed, e.g. in a loop for other mathematical calculations. The java program should understand that this is not a text but a mathematical expression. How can ... |
5. about Textfield( simple isn't that) coderanch.comHello friends!!!.., I hope u can answer this. 1) In a text field the default alignment of the cursor is right side.Can we align it to the left side? 2) Unlike that can we make cursor invisible in the textfield but still the text can be entered from left? 3)can we restrict the textfield to accept only numbers? Please answer me ... |
6. Masking a text field coderanch.com |
7. Put padding in textfield coderanch.com |
8. textfield and drawString method in JApplet coderanch.com |
9. Static TextField coderanch.com |
10. JTextFormatted TextField coderanch.com |
11. TextField in awt coderanch.com |
12. How do I force uppercase in TextField? coderanch.comI've tested it and it worked with the following code. Try using my UpperCaseTextField insted of a normal JTextField and it works: /* * UpperCaseTextField.java */ import java.awt.*; import javax.swing.*; import javax.swing.text.*; public class UpperCaseTextField extends JTextField { public UpperCaseTextField() { super(); } public UpperCaseTextField(Document doc, String text, int columns) { super(doc, text, columns); } public UpperCaseTextField(int columns) { super(columns); } ... |
13. TextField for a translator coderanch.comHi there I am busy writing some translation software for my company and I have run into one requirement from the boss that I am having trouble implementing. Basically, I am stripping the values out of define statements out of php files and displaying these in textfields in a table. Now, there are pieces in the strings that the user must ... |
14. PopupMenu Class(TextFields) + Main Class coderanch.com |
15. TextFields coderanch.comHi, does anybody know how to place several Textfields in the center of a frame, and add a 'submit' button to process the values entered in the Textfields. I have looked at some examples, but I think they all seem to use components or sumthing, and appear only to be placed north or south in the frame. I can't figure out ... |
16. setting location in getFocus() ? for text field coderanch.comI'm reading this you want the cursor at the beginning if the textfield contains only whitespace, or at the end of the last non-whitespace character if so, something like this import java.awt.*; import java.awt.event.*; import javax.swing.*; class Testing extends JFrame { String[] tfText = {" "," some text ","more text ","another"}; public Testing() { setLocation(400,300); setDefaultCloseOperation(EXIT_ON_CLOSE); JPanel panel = new JPanel(new ... |
17. Hidden textfields coderanch.com |
18. Language in TextField coderanch.com |
19. Focussing a TextField coderanch.comHi, I've written an AWT Frame with text fields and buttons. On pressing the "Clear" button, I want the text fields to be cleared and the cursor should return to the first text field. I've done clearing the text fields. But how do I return the cursor to the first text field? Here is my code so far: /* * Created ... |
20. dateformat in textfield coderanch.comimport java.awt.*; import java.awt.event.*; import java.text.*; import java.util.Calendar; import javax.swing.*; import javax.swing.event.*; public class DateHelp { JTextField dateField; DateFormat dateFormat = new SimpleDateFormat("ddMMMyyyy"); private void initialize() { dateField.setText(dateFormat.format( Calendar.getInstance().getTime())); dateField.selectAll(); } private JPanel getContent() { dateField = new JTextField(8); dateField.addActionListener(new FieldPrompter()); JPanel panel = new JPanel(new GridBagLayout()); GridBagConstraints gbc = new GridBagConstraints(); gbc.weighty = 0.5; gbc.gridwidth = GridBagConstraints.REMAINDER; gbc.anchor = GridBagConstraints.SOUTH; ... |
21. Textfield with autoscroll feature! coderanch.comHi, In our project we need a feature of textfield with autoscroll. It is similar to the auto scroll feature provided by google's home page textfield. If I type "a" in the textfield on the google's home page, it shows all the words typed in the past starting with "a". On the similar lines I need to provide a textfield. When ... |
22. detect textfield coderanch.com |
23. including an icon inside a text field. coderanch.com |
24. How to cast JTextField to TextField object? coderanch.com |
25. text field coderanch.com |
26. How to set maxlength for java.awt.TextField coderanch.com |
27. swng text field issues coderanch.com |
28. Delay during population of textfields coderanch.com |
29. make textfield look like a textfield coderanch.com |
30. AWT textfield behave weird when run using MicroSoft JVM coderanch.comHi, I am facing a weird problem when using MicroSoft JVM to run my Applet. I have an AWT panel with 4 textfields which is added to a dialog box. Everything goes fine until I enter a decimal value into the textfield and close the dialog box. When i reopen the dialog box the textfield inside the panel with all the ... |
31. Textfield on canvas coderanch.com |
32. Combining TextField with moving Sprite coderanch.comHi, I'm trying to add a textfield to a graphic which is moving over the screen. Can someone please point me in the right direction. I'm kind of lost at this point. What do I already have: Several moving images. What do I want: Showing status information (e.g. location) of the moving image. The information should be grouped with the image ... |
33. Text field does not realize its being called java-forums.orgI'm not sure if this is because I'm initializing the textfields inside a method instead of the constructor, but in any case I cannot get anything to be printed out no matter which field I type into. Java Code: public class TransformWindow extends JFrame { private JTextField x1_textField; private JTextField x2_textField; private JTextField y1_textField; private JTextField y2_textField; private Shape shape[]; private ... |
34. textfield on a menuitem java-forums.org |
35. How to make Swing JTextField look like AWT TextField? java-forums.org |
36. Game In progress need help with Textfield Gui java-forums.orgA bit new to the forums here, I thank you for your help in advance. Ok, so I have a game already a private project of mine. So far I have 1k lines of code and I'd like to redirect all the System.out lines to a gui application that i've made(its not perfect just a test) A) how would I have ... |
37. Regarding Text Field java-forums.orgHi, I have added two text fields and a button on a panel which is set with cardlayout now i want to store characters in two different strings. And when i enter the text in the fields and click the button i should move to second card. Only i need is getting the data from the text fields and comparing it. ... |
38. Does Java Swing have IP Address text field? forums.oracle.comNo, it doesn't. There's no such entity as an "IP address field", but I guess you're on about one of the several common ways they're input, eg: 4 small text fields that take 3 digits each, or one that fills in a dot or - between 4 sets of 3 digits. Either way, Swing doesn't have one, but knocking one up ... |
39. println to textField in Swing forums.oracle.comSwing related questions should be posted in the Swing forum. Using a text field doesn't make sense. A text field can only display a single line of text. Most people use a JTextArea. I've seen solutions posted in the Swing forum. Use "console" as a keyword or maybe "consoleoutputstream" was one particular solution. |
40. How to define mathematical expression from the GUI textfield? forums.oracle.comDear Sirs, I would be very grateful if you could advise in the following problem. I need that an arbitrary function, say f(x)=x^2+sin(x), was entered in the GUI textfield and then this function could be placed, e.g. in a loop for other mathematical calculations. The java program should understand that this is not a text but a mathematical expression. How can ... |