Hooraaay !! :-* finnaly managed it and was so easy to do it .... i have moved the initialization of the intr
and now placed it inside of the for bubble. Now the first object from array keeps...
Type: Posts; User: piulitza
Hooraaay !! :-* finnaly managed it and was so easy to do it .... i have moved the initialization of the intr
and now placed it inside of the for bubble. Now the first object from array keeps...
I did those changes and now i have
public static void listare(Intrebare intr) // method to list current values of String of the intr object
{
System.out.println("Current values of...
Here it is where i assign values for the object (i also added some comments this time):
for (int i=0; i<j&&in.hasNext();i++)
{
intr.setIntrebare(in.next()); // here i...
Nope...still not works .. :-L outside the "for" bubble both objects are equal.
I think the problem occurs outside the try ..... i would try to use throws to be able avoid using try.
Inside the try {} brackets, the 2 objects are different..but looks like the first of them gets the values from second one outside it. Have no clue why it happens like that :confused:
I have replaced the static method from the from the first class to
public static Intrebare[] ListaCompletaIntrebari (int j,String url)
{
Intrebare intr = new Intrebare();...
Yeah, there j is the number of expected items .. and on line 20
is the null. i have also changed little the for from the class Intrebare from
to
to ensure that i do not...
I think i need little more help.In the dialog with introducing the questions i have managed to write the string to a file using BufferedReader (written 2 of them in the file), and i have done aswell...
hmm looks like BufferedWriter and other writing methods overwrites the text in the file each time i introduce the Strings.. and i want to gather them all. I will leave it for a while until i learn...
Yeah ..i think i would try to use to write the Strings directly.I have a smaller program i did longer time ago that serialize an array of object. And that works very well and i understood basically...
I need some more advice.As i do not know anything about database yet... I try to save all the Strings from these TextFields into an object so i need access them into another dialog. I have tried to...
getText() returns a String....after thinking little more i have tried isEmpty() method for the string and seems that Wroks !:cool:
I have one more question (hope i do not become annoying). How can i check if a TextField is empty?
i have tried all these :
int i = 0
if (tf1.getText().equals(null))
{
I have one more question...... how can i read an int from textfield? I see i have only method to read string
Oh yeah ...finally understood. Before i written the values and dimensions of the textfields inside the constructor method. But now i have written that out of the constructor, making them public...
i think the problem is at tf1.getText() i do not understand why but seems it does not want to read the text from there. i have tried to delete itr= itr+ta1.getText(); and see if the others...
Hmm ... well i have replaced
System.out.println(ta1.getText());
System.out.println(tf1.getText());
System.out.println(tf2.getText());
System.out.println(tf3.getText());...
Well i have a class with main ....I have 4 longer classes at all but this is the class where i get the problems.
If i do not put there the exception thing i get
Exception occurred during event...
I have studied Java programming basics at university....i like it much and started to learn more about it. I have began with AWT and learned most about it ...but only doing small programs with 2-3...