Search:

Type: Posts; User: curmudgeon

Search: Search took 0.08 seconds.

  1. Replies
    8
    Views
    1,655

    Re: Event Listener for ComboBox

    You simply call methods on the JComboBox variables. You know the variables so it shouldn't be hard to extract the selected item from each one.



    If you're getting compilation errors that you...
  2. Replies
    8
    Views
    1,655

    Re: Event Listener for ComboBox

    No, no need for that at all, and in fact that would get you the wrong result. Assuming that you've given your submit JButton an ActionListener, inside of that listener's actionPerformed method you go...
  3. Replies
    8
    Views
    1,655

    Re: Event Listener for ComboBox

    Your current code won't compile.

    But looking over it, I wonder why you're even adding listeners to the JComboBoxes. Why not simply leave them alone as there is no need for them to do anything when...
  4. Replies
    8
    Views
    1,655

    Re: Event Listener for ComboBox

    This tutorial: How to Use Combo Boxes (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Swing Components)

    has just what you need, a "handling events" section. I suggest that you read it...
Results 1 to 4 of 4