Search:

Type: Posts; User: GregBrannon

Search: Search took 0.13 seconds.

  1. Replies
    7
    Views
    1,594

    Re: Arrays, JButton, and Action Listener

    Yes, you're collecting and printing the selected index. You want the item at the index, not the index itself.
  2. Replies
    7
    Views
    1,594

    Re: Arrays, JButton, and Action Listener

    Different components have different ways to clear them. If the component has a setText() method, you can clear by calling theComponent.setText( "" ); // empty quotes. If you've provided a blank...
  3. Replies
    7
    Views
    1,594

    Re: Arrays, JButton, and Action Listener

    getSelectedIndex() returns the index of the selected item. In other words, the 5th item in the JComboBox might be 20.00. getSelectedIndex() returns '4' (the 5th item), not 20.00. Review the...
Results 1 to 3 of 3