What if your inputstring is null??? Because it becomes from a object ....
java.lang.NumberFormatException: For input string: "null"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
a piece of my code ...
XManager is a class which me return a collection
Another class use this ....:
Collection entries = XManager.INSTANCE.findX(ThingsFrom);
Iterator iter = entries.iterator();
while (iter.hasNext()){
object = (Object)iter.next();
Vector row = new Vector()...
Suppose the result of your vector gives you 2 rows .... Is it possible to make 1 string of this result, also if you have 3 rows or more ....
I work with a linked list, collection ...
Result: one column in my case has 2 or more rows ...
1
2
I want to make of this a string = "1 2 " or "1 2 3...
Suppose: you have folowing string of numbers ....
"1 2 3 4 5 6 "
How to convert it to an integer?? The procedure will also be possible if your string exists of 10 numbers .... "1 2 3 4 5 6 7 8 9 10 "
Thanks
Hey,
Who can give a simplified version of code to do this?
Sorry, but I have lost the key .... °) or in other words I have problems to do this ....
Thanks [upsidedown]
String s = (String)thingsComboBox.getSelectedItem(); gives an error
In class things I have:
ID (== int) + thing (==string) = one object
object is sitting in my combobox.
How can I get the contents of thing1 when item 1 in my comboBox is selected. You to put it in a string???
Thanks ...
Hey,
I have following exception : java.lang.ClassCastException
I've read a file, and put the values in objects of a class.
I've put the objects in a combobox. Now I have a list with items .... that I can select but ....
I want to use a selected item, en put it in a string ...
How to do...
Suppose you have a class X:
class X produce an object exists of 2 elements:
ID + Contents
==> each object is formed by this 2 elements ...
==> in code you have 2 classes ...
You have following arraylist-output:
4 AAAAAA 4 = ID AAAAAA = element Contents
5...
Suppose:
You have following arraylist-output:
4 AAAAAA
5 ZZZZZZ
2 DDDDDD
1 AAAAAA
3 AAAAAA
one row is one object:
Questions:
how to sort rows on numbers ascending?
==> output = 1 AAAAAA
2 DDDDDD
3 AAAAAA
4 AAAAAA...
This will be something like this ......
Greetings [dazed]
/*
* Created on 21-mei-2004
*
*/
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
public class ReadingFile {
public ReadingFile(String...
a) Right. I meant column 2 .... visual column 3
b) c)
The purpose is to put selected combinations in an arraylist (or other collection), when a new combination is made (see button add)
We want to use the arraylist:
to remove (new button (to do))
After removing one combination, the purpose...
Existing code below
Other questions:
+ Is it possible to sort this, for example on column 3?
+ What to do if you want remove one row in such an array?
+ What to do to refresh your list (see textArea in source code below...)?
file: persons.txt = a list of persons:
0 John
1 Mary
2 Jenny
3...
Suppose you have folowing persons.txt file with a list of persons:
0 John
1 Mary
2 Jenny
3 Michael
4 Jane
For the code below special thanks for prosper!!! to read this in 2 comboboxes.
My question now:
you selected one item in combobox1 and one item in combobox2. (Above...
Suppose you have folowing persons.txt file with a list of persons:
0 John
1 Mary
2 Jenny
3 Michael
4 Jane
How to read this in a combobox java-swing?
Thanks!!!!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.