Results 1 to 3 of 3

Thread: JOptionpane

  1. #1
    tommyyyy is offline Member
    Join Date
    Mar 2009
    Posts
    10
    Rep Power
    0

    Default JOptionpane

    Hi all,
    I would like to make a joptionpane which user can select their options
    For example if user click button 1, it will link to other method to do some function, button 2 will do the others.
    could somebody post some relative code

  2. #2
    makpandian's Avatar
    makpandian is offline Senior Member
    Join Date
    Dec 2008
    Location
    Chennai
    Posts
    396
    Rep Power
    6

    Default

    Call the JOptionPane class in Action event of button?
    JoptionPane class contains lot of constructor.Depend upon your application you can select that.
    Mak
    (Living @ Virtual World)

  3. #3
    faisalcmpm is offline Member
    Join Date
    Feb 2009
    Posts
    22
    Rep Power
    0

    Default

    Check this sample
    int option = JOptionPane.showOptionDialog(this, "YourMessage", "Title of option PAne", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, null,null);
    if(option == JOptionPane.YES_OPTION) {
    //Do ur business here
    }

Similar Threads

  1. JOptionPane.showInputDialog
    By mayhewj7 in forum New To Java
    Replies: 5
    Last Post: 02-25-2009, 06:04 AM
  2. JOptionPane
    By Mir in forum New To Java
    Replies: 5
    Last Post: 11-29-2008, 02:04 AM
  3. JOptionPane
    By whosadork in forum New To Java
    Replies: 2
    Last Post: 10-23-2008, 02:17 AM
  4. JOptionPane (customizing)
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 03-14-2008, 11:39 AM
  5. About JOptionPane.showMessageDialog
    By jhetfield18 in forum AWT / Swing
    Replies: 2
    Last Post: 11-02-2007, 10:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •