Search:

Type: Posts; User: Norm

Search: Search took 0.11 seconds.

  1. Replies
    26
    Views
    2,747

    Re: Help with editing offscreen graphics

    Try filling it with a transparent color before drawing the text.
  2. Replies
    26
    Views
    2,747

    Re: Help with editing offscreen graphics

    If the images are displayed in the same area of the GUI, the top/upper layers need to have transparent backgrounds so the images displayed first will show through the later ones.
  3. Replies
    26
    Views
    2,747

    Re: Help with editing offscreen graphics

    If you have an image (the bottom layer) and draw a String on that image, then the resultant image will have the original image with a String drawn on it.
  4. Replies
    26
    Views
    2,747

    Re: Help with editing offscreen graphics

    Can you explain what the problem is? I executed the last version: after a mouse event, a line of text was drawn. ????
  5. Replies
    26
    Views
    2,747

    Re: Help with editing offscreen graphics

    The posted code looks like it has a lot more lines of code than are needed for what you are trying to test. Can you make a smaller, simpler program that shows the problem?
  6. Replies
    26
    Views
    2,747

    Re: Help with editing offscreen graphics

    What is supposed to happen when the code is executed?
    I used my images. When I click on the frame it displays:vone large image in the middle, two much smaller images in lower left and lower right...
  7. Replies
    26
    Views
    2,747

    Re: Help with editing offscreen graphics

    Can you post the code in a small, complete program that compiles, executes and shows the problem.
  8. Replies
    26
    Views
    2,747

    Re: Help with editing offscreen graphics

    The steps:
    1) create a BufferedImage
    2) get a graphics for that BI
    3) use that graphics to draw on that image
    4) draw that image on the GUI using the graphics passed to the paintComponent() method
  9. Replies
    26
    Views
    2,747

    Re: Help with editing offscreen graphics

    Its the other way. You create BufferedImage and get a Graphics object that goes with it that can be used to draw on that BufferedImage. Use the graphcs object given to the component to drawn that...
  10. Replies
    26
    Views
    2,747

    Re: Help with editing offscreen graphics

    Create a BufferedImage, get its graphics, draw on it and then draw that image on the screen.
  11. Replies
    26
    Views
    2,747

    Re: Help with editing offscreen graphics

    Some of the Swing classes have a way of using layers:
    How to Use Layered Panes (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Swing Components)

    To save old drawings when a component...
  12. Replies
    26
    Views
    2,747

    Re: Help with editing offscreen graphics

    Can you explain what "individual layers" are? If you were using pencil and paper to make a drawing, what would be a layer?


    Resizing the component will remove what was drawn before.
  13. Replies
    26
    Views
    2,747

    Re: Help with editing offscreen graphics

    Can you explain what the problem is? What does the code do or not do when it is executed?
Results 1 to 13 of 13