Search:

Type: Posts; User: pbrockway2

Page 1 of 20 1 2 3 4

Search: Search took 0.16 seconds.

  1. Thread: Error

    by pbrockway2
    Replies
    8
    Views
    88

    Re: Error

    Also, that isn't the code you asked about in your OP!

    Take the code in the question, add any context is suggested by the question (*), and the compiler will tell you what the error is.

    (*) Eg...
  2. Replies
    5
    Views
    210

    Re: Array Sorting Benchmark

    Printing the arrays is OK if you want to check you are comparing sorts of the same array. But perhaps it should occur outside the timing stuff - otherwise you are comparing the times to...
  3. Replies
    1
    Views
    74

    Re: Hello folks!

    Hi thasykologist, welcome to the forums!
  4. Thread: Hello

    by pbrockway2
    Replies
    2
    Views
    48

    Re: Hello

    Hi Aikikai, welcome to the forums!
  5. Replies
    5
    Views
    109

    Re: Writing a sequential Data file

    Don't use the write() method of TextComponent, use the write() method of the BufferedWriter. It takes a String argument which you get from the text component using getText().

    ---

    I do like the...
  6. Replies
    5
    Views
    109

    Re: Writing a sequential Data file

    I'm guessing donorName etc are TextComponent instances, and that you are calling the write(Writer) method of each.

    If you are getting unwanted newlines (I guess because the contents of each...
  7. Re: TPAM: Total Privileged Access Management , I need some information about this API JAV Library an if possible some examples . Thanks

    Do you mean the Dell Total Privileged Access Management system? According to the API manual (p16) "Documentation for the TPAM API Java library is available in Javadoc format. Please see the...
  8. Replies
    45
    Views
    616

    Re: Java Final practice - design help

    I think that's right.

    At the moment you set the JList up as follows:



    jList1.setModel(new javax.swing.AbstractListModel() {
    String[] strings = {"test"};
    public int getSize() {...
  9. Replies
    45
    Views
    616

    Re: Java Final practice - design help

    What is "jList1.add(this.Result, j);" supposed to do? Unless I am misremembering JList does not have an add(String,int) method.
  10. Replies
    45
    Views
    616

    Re: Java Final practice - design help

    I'm guessing line 139 of your code is this:



    if(Customers.get(i).getSocial() == Double.parseDouble(jTextField1.getText()))
    {


    You will get the NumberFormatException if jTextField1 contains...
  11. Replies
    11
    Views
    167

    [SOLVED] Re: Printing Squares (function-array help)

    Well done. On with the next exercise!
  12. Replies
    45
    Views
    616

    Re: Java Final practice - design help

    Yes and no. The point is we should be careful about what gets passed. You don't pass variables or objects (although people often speak this way) what you pass are values.

    In main() you say "new...
  13. Replies
    45
    Views
    616

    Re: Java Final practice - design help

    It's still all about "scope"

    Customers (it should really start with a lowercase letter)

    This variable occurs twice. The class has a private variable Customers that can be used anywhere...
  14. Replies
    45
    Views
    616

    Re: Java Final practice - design help

    Yes, if you populate a list from the static main() method, but access it from an EmployeeFrame instance then the compiler will object unless the list is static. But keeping the compiler happy is the...
  15. Replies
    2
    Views
    66

    Re: Hello Everyone

    Hi mosini, welcome to the forums.

    There are some useful notes for people who haven't posted here before attached to the "Problems" forum. Again, welcome!
  16. Replies
    45
    Views
    616

    Re: Java Final practice - design help

    I've just skimmed this thread, but is there some reason you made the lists static? In general, don't make things static without a reason. And if you do have a reason, think again (or ask here)...
  17. Replies
    11
    Views
    167

    [SOLVED] Re: Printing Squares (function-array help)

    Don't put the values 1->10 into the array. Instead do what 2teez suggests and use the function findSquare(). Put whatever it returns into the array.
  18. Re: Where in the Java Runtime environment does each of the following live?

    https://docs.oracle.com/javase/specs/jvms/se8/html/index.html

    [Edit] I might add that I don't think there is *an* answer to each of these. For example where "private static int c" might reside...
  19. Replies
    11
    Views
    167

    [SOLVED] Re: Printing Squares (function-array help)

    OK, so you are printing squares[c], but the thing is you havn't put anything in to the array!



    squares[c] = ...
    System.out.println(squares[c]);


    Once you have figured out what to assign to...
  20. Replies
    11
    Views
    167

    [SOLVED] Re: Printing Squares (function-array help)

    It's a good idea to post any compiler messages you get in full if you can't understand them. Someone is sure to be able to explain them. Likewise if your program doesn't do what you expect or...
  21. Replies
    2
    Views
    111

    Re: Dynamic Popup Dialog

    It sounds like you could try a JDialog subclass that does what you want. An event listener could respond to radio button changes by setting the visibility of the various text components. (and...
  22. Re: Points to Ponder for Java Null Pointer Exceptions

    I'm guessing line 38 is this one:



    return pStart.abstand(pEnde);


    You will get a NullPointerException whenever you try and use a variable or expression as if it had a non null value when,...
  23. Re: Points to Ponder for Java Null Pointer Exceptions

    Linie l2 = new Line();


    Even if we change "new Line()" to "new Linie()", this line will not compile with the Linie class you posted. Don't translate, post the exact code you are using.
  24. Re: Points to Ponder for Java Null Pointer Exceptions

    In the main() method of your Aufgabe_6_1 class you create instances of the Linie class. But the code you posted for for a different, Line, class. Also we don't have the Punkt2d class at all.
    ...
  25. Thread: Hey All!

    by pbrockway2
    Replies
    2
    Views
    131

    Re: Hey All!

    Hi toshiru, welcome to the forums!
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4