Search:

Type: Posts; User: fkmk

Page 1 of 3 1 2 3

Search: Search took 0.28 seconds.

  1. Thread: SQL project

    by fkmk
    Replies
    10
    Views
    228

    Re: SQL project

    Thank you for all your help! ;)
  2. Thread: SQL project

    by fkmk
    Replies
    10
    Views
    228

    Re: SQL project

    You are right. :) Thank you.
    Do you think the project is realised ok? :)
  3. Thread: SQL project

    by fkmk
    Replies
    10
    Views
    228

    Re: SQL project

    But what if each model has different year of production? :)
  4. Thread: SQL project

    by fkmk
    Replies
    10
    Views
    228

    Re: SQL project

    PhHein, excatly! You are right. I did not think about it in that way. Each model can have different color and REG number. :)
    Thank you for this suggestion! ;)

    I deleted MODEL from CARS table...
  5. Thread: SQL project

    by fkmk
    Replies
    10
    Views
    228

    Re: SQL project

    PhHein, firstly thank you for your suggestion. You are right, I added a new table describing a model and modified the old one for new meaning.
    I wanted to added mechanic service to the dealership...
  6. Thread: SQL project

    by fkmk
    Replies
    10
    Views
    228

    SQL project

    Hello,

    I have to do a car dealership database in SQL, but firstly I need to make a ERD diagram. I did one, but I want you to take a look at this at tell me, what can I modify, add or delete. :)...
  7. Re: Dijkstra algorithm implementation does not work properly.

    Norm, I tried it with all pathes, and every path shows Infinity as a result.
    I am standing at this problem for a few days and I do not have any idea, how can I modify or fix the code... :(
  8. Re: Dijkstra algorithm implementation does not work properly.

    The output:


    It should look like:
  9. Dijkstra algorithm implementation does not work properly.

    Hey, I have to implement Dijkstra algorithm in Java.
    Input file looks like this:

    First and second numbers are in order source and destination points.
    First and second numbers in another each...
  10. Replies
    74
    Views
    277

    Re: Canvas and MouseListener...

    Norm, yes, I'm curious about it, but I still have no idea, why it happened. :/
  11. Replies
    74
    Views
    277

    Re: Canvas and MouseListener...

    Norm, I added test, as you said and it works! Thank you again! Let God bless you! :) Thank you for all your help! If you will have any problems with everything, ask me, and I will help you also!...
  12. Replies
    74
    Views
    277

    Re: Canvas and MouseListener...

    Norm, yes, Points[1] is null... but I don't know why. My code looks ok and I don't see any mistakes in it. :(
  13. Replies
    74
    Views
    277

    Re: Canvas and MouseListener...

    Norm, sorry, I cut something.
    Here is the full code:


    [java.awt.Point[x=286,y=371], null]
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at...
  14. Replies
    74
    Views
    277

    Re: Canvas and MouseListener...

    Norm, oh, sorry for that... :)

    Here is what shows in console:


    [java.awt.Point[x=400,y=219], java.awt.Point[x=404,y=219]]


    Printing before accessing shows nothing, empty field.
  15. Replies
    74
    Views
    277

    Re: Canvas and MouseListener...

    Norm, here is the code that defines pointsList:


    private final ArrayList<Point[]> pointsList = new ArrayList<>();


    and the code with the print statement:


    for(Point[] array:...
  16. Replies
    74
    Views
    277

    Re: Canvas and MouseListener...

    Norm, it prints only one point


    [Ljava.awt.Point;@3ff8bf54

    It is what it prints after one drawing with mouse.

    I don't know, if I understand what you mean, but printing before accessing...
  17. Replies
    74
    Views
    277

    Re: Canvas and MouseListener...

    Norm, ok, I printed a content with this code:


    for(Point[] array: pointsList) {
    System.out.println(array);
    }


    and in the console it printed:
  18. Replies
    74
    Views
    277

    Re: Canvas and MouseListener...

    Norm, I don't know why Points[1] have a null value... :/ in my opinion it should iclude any value.
    pointsList is a list with all points which mouse intercepted. :)
  19. Replies
    74
    Views
    277

    Re: Canvas and MouseListener...

    Norm, it is line 39:


    g.drawLine(p1.x, p1.y, p2.x, p2.y);


    Point p2 and Points[1] had a null value. :)
  20. Replies
    74
    Views
    277

    Re: Canvas and MouseListener...

    Norm, debugger said, that

    Point p2 = Points[1];
    g.drawLine(p1.x, p1.y, p2.x, p2.y);
    there is null. :)
  21. Replies
    74
    Views
    277

    Re: Canvas and MouseListener...

    Norm, should I have to create ArrayList of ArrayList in Drawing class? I have no idea, how to "include" there Arrays from e.g Pencil class (which include drawn points).
    Thanks :)

    edit//
    I have a...
  22. Replies
    74
    Views
    277

    Re: Canvas and MouseListener...

    Look: I press the button e.g Pencil and I draw something on my JPanel. After that, I want to sketch in something on JPanel by brush, so I press the button, which calls Action of Paintbrush. I draw...
  23. Replies
    74
    Views
    277

    Re: Canvas and MouseListener...

    Norm Ok, sorry. :)

    I changed the code a bit:

    Here is a part code of calling specific tools in one class:


    static int warunek;

    if(action.getSource() == newDrawingArea) {
  24. Replies
    74
    Views
    277

    Re: Canvas and MouseListener...

    Norm thank you, I have solved it! :)
    But another problem has occured...

    The problem is, that after pressing buttons, there is no action in JPanel. Take a look at this:

    Here is my code for...
  25. Replies
    74
    Views
    277

    Re: Canvas and MouseListener...

    Norm, thank you! :) But I just wonder if there is a way to connect these to classes (Drawing and Pencil). :)
Results 1 to 25 of 58
Page 1 of 3 1 2 3