Jamie CB

Greenhorn
+ Follow
since May 10, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jamie CB

The Object[] is coming from a JList, so I cant really change it. Ill just loop through it instead. Thanks for clearing that up.

Jamie
18 years ago
I have an Object[] of integers. Im trying to get an Integer[].

Integer[] keys = (Integer) getArray() gives me "Inconvertible types" when compiled.

Integer[] keys = (Integer[]) getArray() gives me a ClassCastException during runtime.

What am I doing wrong? Can I even convert them that simply or do I have to iterate through?

Thanks

Jamie
18 years ago
I have a pair of JLists in my program. I have overidden the AbstractListModel so that they are wrapped around a hash table - one displays keys and the other values. If I change something the hash table they deal with it fine, but if I try to add a value they trun white. if I then resize the container they disappear altogether and never come back. Ive tried repaint() and revalidate() after adding the extra element, but with no effect. Im sure the list model is correct - what else can I do?

Jamie
18 years ago