The Artima Developer Community
Sponsored Link

Java Answers Forum
creating a reset button

1 reply on 1 page. Most recent reply: Dec 17, 2004 3:32 AM by mausam

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Aaron

Posts: 1
Nickname: slyver
Registered: Dec, 2004

creating a reset button Posted: Dec 3, 2004 4:39 AM
Reply to this message Reply
Advertisement
I created a program with two classes nothing fancy but simple. I added a reset button but the problem is I want to reset the combo box or set it to the beginning of the list. This is what I have to give you an idea.

public void reset() {
gui.principalamt.setText(null);
gui.term.setText(null);
gui.intrate.setText(null);
gui.mopay.setText(null);
gui.amort.setText(null);
gui.comboModel.setElement("Enter Manually");

The last line is the one I want to get working in order to reset the combo box. Can anyone throw me a bone on this one?

Thanks


mausam

Posts: 243
Nickname: mausam
Registered: Sep, 2003

Re: creating a reset button Posted: Dec 17, 2004 3:32 AM
Reply to this message Reply
if (comboBox.getItemCount()>0)
comboBox.setSelectedIndex(0);

Flat View: This topic has 1 reply on 1 page
Topic: Decode AIS data(need help) Previous Topic   Next Topic Topic: use of static in overridden method

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use