Search:

Type: Posts; User: Norm

Search: Search took 0.21 seconds.

  1. Replies
    11
    Views
    1,226

    Re: Printing two rectangles on same Frame in Java

    What are the messages printed out by the println() method in the paintComponent() method?
    That will give you some information about where the JPanel components are located and how big they are.
  2. Replies
    11
    Views
    1,226

    Re: Printing two rectangles on same Frame in Java

    From that you can see that the other component is not being shown in the JFrame. The second component that was added replaced it.


    From post #4:
    What layout manager does the container use that...
  3. Replies
    11
    Views
    1,226

    Re: Printing two rectangles on same Frame in Java

    What prints out after you added the statement I posted?
    Copy and paste the console's contents. No images.
  4. Replies
    11
    Views
    1,226

    Re: Printing two rectangles on same Frame in Java

    Try debugging the code by adding this in the paintComponent() method:

    System.out.println(mystring + " " + getBounds());

    Look at what is printed out.


    The coordinates are relative to...
  5. Replies
    11
    Views
    1,226

    Re: Printing two rectangles on same Frame in Java

    What layout manager does the container use that you are adding the components to?
    How does the layout manager know where to put the components?
    Does the last component that is added replace the...
  6. Replies
    11
    Views
    1,226

    Re: Printing two rectangles on same Frame in Java

    Can you make a program for testing that compiles, executes and shows the problem that does not require the 3rd party packages: org.apache.poi?
    The displaying of data should not require reading any...
Results 1 to 6 of 6