Search:

Type: Posts; User: Norm

Search: Search took 0.11 seconds.

  1. Replies
    30
    Views
    4,069

    Re: Another printing topic

    What is all that code for?
    Reread my suggestion in post#29. There are two classes: JFrame with a main() method and JPanel with a paintComponent() method. No more.
  2. Replies
    30
    Views
    4,069

    Re: Another printing topic

    Create a special test program to work out the logic. Create a class that extends JPanel, override its paintComponent() method and add an instance of it to a JFrame so you can see the results.
    In...
  3. Replies
    30
    Views
    4,069

    Re: Another printing topic

    What is the question?
  4. Replies
    30
    Views
    4,069

    Re: Another printing topic

    That is what will happen when you draw multiple Strings at the same location.
    Change the values of x and/or y so each String is drawn at its own location.
  5. Replies
    30
    Views
    4,069

    Re: Another printing topic

    Please post the full text of the error messages.

    When using the methods of the Graphics, you are responsible for positioning where everything goes that is "printed" using a draw method. The...
  6. Replies
    30
    Views
    4,069

    Re: Another printing topic

    Can you explain and ask a specific programming question?
  7. Replies
    30
    Views
    4,069

    Re: Another printing topic

    You need to set the x and y values for each line you draw with drawString().
    For testing you could override the paintComponent in a JPanel and do the drawing there.

    From db on another forum:...
  8. Replies
    30
    Views
    4,069

    Re: Another printing topic

    Can you state what the problem is?
  9. Replies
    30
    Views
    4,069

    Re: Another printing topic

    What is the problem that you are trying to solve? I thought it was using the drawString() method to draw a multi-line String. The rest of the code is in the way for testing that problem. In fact...
  10. Replies
    30
    Views
    4,069

    Re: Another printing topic

    I'd rather not do all that.
    Can you hardcode a string and use that vs all the other stuff.
  11. Replies
    30
    Views
    4,069

    Re: Another printing topic

    Can you make a program that only needs to be compiled and executed to show the problem. The code you posted looks like it wants to read some file. Remove any need for anything besides the code to...
  12. Replies
    30
    Views
    4,069

    Re: Another printing topic

    Please explain what you are seeing.
    Can you post a small, simple program that compiles, executes and shows what you are talking about?
  13. Replies
    30
    Views
    4,069

    Re: Another printing topic

    What happens when you compile and execute the code? Does it do what you want?
Results 1 to 13 of 13