Search:

Type: Posts; User: dalythe

Search: Search took 0.09 seconds.

  1. Re: Trying to format an Array using specifiers to appear in TextArea

    I did. I mentioned that I gave it an empty set as a value. Before, I had just declared it with the rest of my instance variables. It still gave the same results, null.
  2. Re: Trying to format an Array using specifiers to appear in TextArea

    This is what printed:

    pData=
    Exception in thread "AWT-EventQueue-0" java.util.IllegalFormatConversionException: f != java.lang.String
    at...
  3. Re: Trying to format an Array using specifiers to appear in TextArea

    I deleted the line System.out.println(pData); that printed the "nu" value. I gave pData a empty set value initially, ran the code from post #9, and I got the following error:

    Exception in thread...
  4. Re: Trying to format an Array using specifiers to appear in TextArea

    nu printed out
  5. Re: Trying to format an Array using specifiers to appear in TextArea

    Obviously nothing. I think the compiler is having a problem with the format specifiers that I used on prtData. It is still saying nu.

    1914

    Now if I take the attempt to format out of the code I...
  6. Re: Trying to format an Array using specifiers to appear in TextArea

    The String variable pData is "supposed" to contain the formatted Strings. This is the variable I appended to my StringBuilder.



    prtData = printArray();
    pData = String.format("%8.2f%n", pData);...
  7. Re: Trying to format an Array using specifiers to appear in TextArea

    After inputting my values for the array, I hit my button and it produces this output in the TextArea:

    ***************************************************
    Raw Tutoring Earnings Data

    nu
    ...
  8. Re: Trying to format an Array using specifiers to appear in TextArea

    I'm not per say getting an error message but it is showing nu in the TextArea where the format contents supposed to appear. Here are the changes I tried :



    private void...
  9. Re: Trying to format an Array using specifiers to appear in TextArea

    Once I append the results of the loop to the variable, its like I can't format it. I tried using String.format() with prtData being my String that I am trying to format. prtData contains the contents...
  10. Trying to format an Array using specifiers to appear in TextArea

    I created a method to iterate through my array and collect all the values. I then appended the results to a String variable. When I append the variable to the TextArea, it shows all the values in one...
Results 1 to 10 of 10