Search:

Type: Posts; User: piulitza

Search: Search took 0.17 seconds.

  1. Re: I have a problem with reading 5 strings from an AWT dialog window.

    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...
  2. Re: I have a problem with reading 5 strings from an AWT dialog window.

    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...
  3. Re: I have a problem with reading 5 strings from an AWT dialog window.

    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...
  4. Re: I have a problem with reading 5 strings from an AWT dialog window.

    Nope...still not works .. :-L outside the "for" bubble both objects are equal.
  5. Re: I have a problem with reading 5 strings from an AWT dialog window.

    I think the problem occurs outside the try ..... i would try to use throws to be able avoid using try.
  6. Re: I have a problem with reading 5 strings from an AWT dialog window.

    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:
  7. Re: I have a problem with reading 5 strings from an AWT dialog window.

    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();...
  8. Re: I have a problem with reading 5 strings from an AWT dialog window.

    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...
  9. Re: I have a problem with reading 5 strings from an AWT dialog window.

    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...
  10. Re: I have a problem with reading 5 strings from an AWT dialog window.

    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...
  11. Re: I have a problem with reading 5 strings from an AWT dialog window.

    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...
  12. Re: I have a problem with reading 5 strings from an AWT dialog window.

    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...
  13. Re: I have a problem with reading 5 strings from an AWT dialog window.

    getText() returns a String....after thinking little more i have tried isEmpty() method for the string and seems that Wroks !:cool:
  14. Re: I have a problem with reading 5 strings from an AWT dialog window.

    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))
    {
  15. Re: I have a problem with reading 5 strings from an AWT dialog window.

    I have one more question...... how can i read an int from textfield? I see i have only method to read string
  16. Re: I have a problem with reading 5 strings from an AWT dialog window.

    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...
  17. Re: I have a problem with reading 5 strings from an AWT dialog window.

    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...
  18. Re: I have a problem with reading 5 strings from an AWT dialog window.

    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());...
  19. Re: I have a problem with reading 5 strings from an AWT dialog window.

    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...
  20. I have a problem with reading 5 strings from an AWT dialog window.

    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...
Results 1 to 20 of 20