getting results from a jdialog

Discussion in 'Java' started by rabbithole, Jul 3, 2008.

  1. rabbithole

    rabbithole

    Joined:
    Jun 23, 2008
    Messages:
    3
    Hi guys,

    I have a jframe with (among other things) a button: when clicking on this button, a jdialog pops up with a combobox and a button (to confirm selection).

    When pressing on the button in the jframe, this happens:
    Code:
    JDialog choose = new JDialog();
    JComboBox cmbSubject = new JComboBox();
    JButton btnConfirm = new JButton();
    choose.add(cmbSubject);
    choose.add(btnConfirm);
    choose.setVisible(true);
    
    How can I get the selected Object from the combobox back to the original jframe? I can't figure this out
    rabbithole, Jul 3, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alexandr Molochnikov

    Re: JDialog in taskbar under Linux

    Alexandr Molochnikov, Jul 31, 2003, in forum: Java
    Replies:
    0
    Views:
    1,809
    Alexandr Molochnikov
    Jul 31, 2003
  2. Monique Y. Mudama
    Replies:
    1
    Views:
    442
    Monique Y. Mudama
    Jun 28, 2005
  3. zelao.itu@gmail.com

    Getting data from a JDialog

    zelao.itu@gmail.com, Jan 16, 2007, in forum: Java
    Replies:
    2
    Views:
    598
    Ian Wilson
    Jan 16, 2007
  4. lovecreatesbeauty
    Replies:
    8
    Views:
    1,629
    Old Wolf
    Sep 12, 2005
  5. Ken Fine
    Replies:
    3
    Views:
    519
    Steven Cheng [MSFT]
    Jul 23, 2008
Loading...

Share This Page