1. showInputDialog question coderanch.com |
2. showInputDialog problem coderanch.comHi, The below code is not working properly. I need to display message "Please enter valid number." when user clicks on "OK" button without entering anything in the input box. seats = JOptionPane.showInputDialog(frame, "Please enter number of tickets :"); // Do nothing if user clicks on Cancel button. if ( seats == null ) return; if(Integer.valueOf(seats).intValue()==0 | | seats.trim().length()==0) { ... |
3. Disappearing showInputDialog coderanch.comGreetings, I am attempting to get input from the user using JOptionPane.showInputDialog. The trouble I'm having is that the dialog always pops up below my existing application window (Pro/Engineer CAD software). Is anyone aware of a way to get the showInputDialog pane to display on top of any other open windows? Thanks. Jerry |
4. showInputDialog coderanch.comSounds more like something for the Swing forum, so I shall move you. You will have to go through the JOptionPane class, but I can't remember any methods which take 4 inputs simultaneously. You can call showInputDialog 4 times; that is quite easy. By the way: If you are not using a Swing GUI you will probably need to pass "null" ... |
5. .showInputDialog() coderanch.comOkay, I am having a small problem and I am sure it is something easy to figure out. I need to convert the null value that results from the user clicking "cancel" to a blank statement or "". I have this code and something goes wrong to the point where I can't check for null values: inputString = javax.swing.JOptionPane.showInputDialog(null, "Input any ... |
6. adding a jbutton to showInputDialog forums.oracle.com |