1. Testing keyboard input with java.awt.Robot stackoverflow.comI have a test that exercises a custom Swing component using java.awt.Robot. I'd like to run the test in our build server, but the build servers run on locked windows ... |
2. Java - Efficient way to get specific input from user stackoverflow.comI am trying to get my options straight with some inputs that I want to enter in an application I am developing. I want the user to input a list(of Strings) ... |
3. How can I listen for keyboard input? such as arrow keys? stackoverflow.comwhat is the easiest way to listen for key presses from the user? Specifically I am writing an image viewer program that uses a JFileChooser to select images and on the ... |
4. Get input from keyboard with Canvas stackoverflow.comI want to create an Upwords application for desktop and so I think that the game table should be displayed as canvas. In the beginning of the game I ... |
5. JGoodies Binding bug question about bufferedModels and keyboard input stackoverflow.comI am using JGoodies Binding on a JTextField like so:
|
6. User input and output stackoverflow.comI have started some code, and I would like to be able to enter a number of no more than five numbers and the return result would place 5 spaces in ... |
7. I want my graphical user interface to accept an integer stackoverflow.comHello I'm having trouble with my work. I want a graphical user interface to accpet a single statement in the form "insert name number". For example of such a command is ... |
8. How to pass user input from GUI to main class stackoverflow.comI'm just starting to work with Java Swing again and I have the same problem as last time. I want to write a program which reads some user input, executes an algorithm ... |
9. Swing GUI doesn't wait for user input stackoverflow.comI am new to Swing, and I have created a simple GUI class with a button and text field. There is a method in this class, |
10. How to intercept and authorize user input with a server stackoverflow.comShort introduction: I have a [physics] simulation framework which used to be a single-user desktop version. The framework serves as a toolkit to enable e.g. teachers to build various kinds of simulation ... |
11. Java Application GUI seeking input in different classes stackoverflow.comI am making an application in java. and i am strucked at Design issue. It has a class
|
12. Java: How can I detect the user has finalised their save name without using an actionListener? stackoverflow.comBasically I wan't to obtain a string from the user, I have created a class called "frames" in which I have a load of methods such as exitChoice(), infoPop(), ect... I ... |
13. Why would I be getting a Null pointer exception with Gui input and listener methods? stackoverflow.comI am new to Java and I am trying to allow a user to enter an employees first and last name via the Gui and when they press the submit button ... |
14. How to capture keyboard inputs in my JWindow using Java? stackoverflow.comWhen i press keyboard with F1 to 12 or 0 to 9 or A to Z (all buttons). I do not see its capturing my keyboard inputs. How do i fix ... |
15. Swing choose device to read ASCI string input from stackoverflow.comI have several devices that install as HID keyboard devices in most any operating system and, when used, send a string of text back, just like a keyboard. Is there ... |
16. Storing and Using user input in GUI bytes.comin Main you've got occupants[aptNo] = 0; but you haven't set aptNo yet. In your event handler you use aptNo = Integer.valueOf(apartment.getText()).intValue(); without handling the case where the string isn't an ... |
17. How can I store user input from GUI into a text file? coderanch.comHi, I have spent ages trying to get this to work. I'm trying to store the value of a textBox into a textFile when the button is clicked. Instead of out.println("This is line 1"); would I use something like: out.println(textBox.text) ?? private void displayDetailsButtonMouseClicked(java.awt.event.MouseEvent evt) { String value = "C:\\textfile.txt"; FileWriter outFile = null; try { outFile = new FileWriter(value); } ... |
18. How to get input from input dilog and do action according to user response? coderanch.comMindy, Below is a brief example: import javax.swing.*; public class Test { public static void main(String args[]) { String inputValue = JOptionPane.showInputDialog("Please input a value"); if(inputValue == null) { JOptionPane.showMessageDialog(null, "You clicked the Cancel or Close button"); } else { if(inputValue.length() == 0) { JOptionPane.showMessageDialog(null, "You forgot to enter a value"); } else { JOptionPane.showMessageDialog(null, "You entered: " + inputValue); } ... |
19. Which component to use to respond to mouse input coderanch.com |
20. key/input buffering in 1.3 vs 1.4 coderanch.comDoes anybody know if 1.4 handles key/input buffering differently than 1.3 did? We have a payment entry interface that is linked to a bar code reader, on our last release (1.3) users could buffer up entries, on this release 1.4 each payment need to wait for the other to resolve first, no code has changed, just the jvm. Robert |
21. What listener for keyboard input? coderanch.com |
22. JSpinner keyboard input event coderanch.comThanks so much Jose for your input, I'm trying to check the input as it is being typed in. I get changeEvent only when the input has changed, ie when the press the up or down arrow. Sometimes a user may want to type in the number in the textfield, and if its an invalid number I would like to pop ... |
23. How can I get the users input? coderanch.comHello All, In this piece of code it reads in a file (work.csv), and then counts how many rows are in the file, which is fine. but I want to be able to get the users input so they can read in what file they want. ie when the user types in the directory of there file, the JTable rows will ... |
24. JtextBox input event coderanch.com |
25. Limiting User Input coderanch.comI am writing a connect four game for an artificial intelligence course. The first phase of the project is to write a user interface. Since I'm sometimes a little bit of an over-achiever, I decided to create a GUI and do some fancy animations and such. I've written the program and it's good enough to turn in. Since there is quite ... |
26. Buffering Keyboard Input...Probably... coderanch.comThanks Joe, that makes a lot of sense. To be completely honest, something like that was bubbling away in the back of my head after I wrote the post, but I couldn't think of an easy way to articulate it. Also, I didn't want to suggest something that I had no idea about, but might influence the replies! Working for a ... |
28. How can I store user input from GUI into a text file? coderanch.comHi, I have spent ages trying to get this to work. I'm trying to store the value of a textBox into a textFile when the button is clicked. Instead of out.println("This is line 1"); would I use something like: out.println(textBox.text) ?? private void displayDetailsButtonMouseClicked(java.awt.event.MouseEvent evt) { String value = "C:\\textfile.txt"; FileWriter outFile = null; try { outFile = new FileWriter(value); } ... |
29. Recommendation for Collecting double [][] from user input coderanch.comI am building a GUI to lay over a script that I have already written for calculating some chemistry "stuff." The crucial input is a list of solutes with a few associated parameters. Like so double[][] adsorbateList = {{119500, 1, 7.27, 0.756, 0, 0.5}, {252700, 2, 1.98, 0, 25, 1}, {131500, 3, 60, 0, 0, 0.25}}; The whole point of the ... |
30. User Interface for taking input based on XSD coderanch.comI have an XSD file with some complex types inside it; meaning all the xml nodes do not take the same structure; some have choice; and based on the choice made there are some additional properties etc. How do I build a user interface for it? My dream UI would be a jtable, and based on the value provided in the ... |
31. TicTacToe! Stop user from changing input coderanch.comBasically I have this code almost done,but i'm not sure how to prevent the user from cheating. Which is from changing the X's and O's I need a little guidance. import java.awt.*; import java.awt.event.*; import java.util.*; import javax.swing.*; import static java.lang.System.*; class tictactoe { static JButton[][] buttons = new JButton[3][3]; static Winner wincon; enum Winner {none, x_wins, o_wins, tie}; static boolean ... |
33. Getting user input using Swing coderanch.comHello What is the best way to get a list of input entered by the user and put them in an array or arraylist so that you can do calculations such as adding all the numbers or multiplying them. for example: Enter numbers to add: 2 3 4 5 ----------------- | CLick to add | ---------------- I tried using JTextArea but ... |
34. Getting User Input to Drawing Shapes java-forums.orgHi I am developing a program that allows users to draw shapes like Rectangle, Oval, Triangle on a JFrame. The user will select a shape from a menu items and then I am supposed to ask the user to enter specifications of the shape he selected like: location, size and color of the shape. I have JMenu that deals with the ... |
35. User input- Pop Up Box java-forums.orgHello, I want to create a pop-up box in Eclipse, which accepts user input and on clicking Enter, processes that input to do something else. Eg: A pop up box which says: Enter a value User enters: 5 and hits Enter After that, 5 is accepted and multiplied by 7 and stored in a variable for further processing. Please suggest how ... |
36. How to draw and delete according to user input? java-forums.orgHello everybody, Currently I'm developing an app that should behave as follows: The user will be presented with a frame. When the user clicks a button on the frame, the app must wait a certain amount of time, and draw a shape on the frame. When the user clicks again (on the button or elsewhere), the shape must be deleted. After ... |
37. How to get user input using GUI forums.oracle.comHi, I need to get a string from the user using GUI and the use the input to create a buffer. I tried using JTextField but for some reason I just cant pass the input as a string to another class for creating the buffer. For example here is the code. Same package and same class {code} Class 123{ Method x(); ... |
38. Problem getting user input from GUI and saving in text file forums.oracle.comHi, I have been trying to get this to work for ages but still not sure of the right way to do this. I have a text file on my hard disk called textFile.txt and I have a JFrame with two fields 'FirstName' and 'LastName' with a submit button and want to append the details to the text file. What is ... |
39. User input determine number of components to be created in GUI forums.oracle.comI am making a small program that keeps track of card game points etc. When I start the program it asks for the number of players, rounds, and the player names. Then the GUI is supposed to appear with JLabels for all the names and rounds etc. I thought this would be easy, but I can't figure out how to create ... |
40. User input w/out GUI forums.oracle.com |
41. GUI APIs and Input Events forums.oracle.comI'm working on some of my own APIs for game development in Java as both a learning project and hopefully something I can carry through to an actual product. One of the APIs is something like an Input Registry. It is designed to keep track of key/mouse events and notify registered listeners when it's registry changes. I've noticed that different GUI ... |