DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2005

    JOptionPane single string input w/four values

    I'm working on a lab assignment that must use one JOptionPane and prompt the user for 4 values and returns a single String value containing these four different values. Once I get the user input I need to convert them to int values.
    In my experience with JOptionPane i've always taking one int at a time and i'm not finding much help either in my books or on the internet.
    I will also have to validate the user input to insure that each number is within range.
    Can anyone help with these two items?

    //code snippet (so far)
    public static void main( String args[] ) {
    inputString = JOptionPane.showInputDialog( " Enter Values-W, X, Y and Z: ");
    }// end main

  2. #2
    Join Date
    Mar 2004
    extend the JDialog class and make your own.


Similar Threads

  1. Packed Data(Comp-3, etc)
    By Marcos in forum VB Classic
    Replies: 3
    Last Post: 01-25-2006, 11:18 AM
  2. App Object
    By Rob Teixeira in forum .NET
    Replies: 15
    Last Post: 05-31-2002, 03:30 PM
  3. Deadlock error.. how to remove
    By Chandra in forum VB Classic
    Replies: 0
    Last Post: 06-22-2000, 12:52 PM
  4. Replies: 0
    Last Post: 06-22-2000, 07:30 AM
  5. Multi-row calculations
    By Bob Hines in forum Database
    Replies: 7
    Last Post: 04-27-2000, 11:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.