Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

jcomboBox help!!

843806Mar 13 2008 — edited Mar 13 2008
hello im trying to set my LIST(ArrayList)which is created in a different class into the combobox as an array. But when i go to view the combobox when it is running it only shows the memory address of one i think. even though i have a toString method in my Account class so that is returns the account name.

please help

anything wrong with this code.

if u need any more code please ask
	private JComboBox getDebitAccountComboBox() {
		if (debitAccountComboBox == null) {
			debitAccountComboBox = new JComboBox();
			debitAccountComboBox.setBounds(new Rectangle(225, 14, 108, 25));
			List aList = window.getList();
			Account[] accountsArray =(Account[]) aList.toArray(new Account[0]);
			debitAccountComboBox.addItem(accountsArray);

			
		}
		return debitAccountComboBox;
	}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 10 2008
Added on Mar 13 2008
6 comments
95 views