DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2005
    Posts
    22

    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
    Posts
    635
    extend the JDialog class and make your own.

    http://java.sun.com/docs/books/tutor...ts/dialog.html

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

Bookmarks

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
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links