• Post Reply Bookmark Topic Watch Topic
  • New Topic

Drawing images/shapes doesn't show up  RSS feed

 
Gulshan Singh
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to develop a program that's going to have to generate a certain number of images, these could be actual files like GIFs and JPEGs or drawn like drawOval(), but whenever I make more then one, only the last one shows up. I don't know how to fix this. The images can be added or deleted, so there's no set number. What should I do?
 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gulshan Singh wrote:I don't know how to fix this. .... What should I do?

You're doing something wrong, but it's hard to know without code. You might want to post code, compilable is preferred, runnable is even better. Best of luck.
 
Rob Spoor
Sheriff
Posts: 21095
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to Swing / AWT.
 
Gulshan Singh
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


This is the code where the function is drawn. In my main class it instantiates some new vertices, each one moving down and right. When I run it only the last vertex drawn shows up. Also, I don't know exactly how many vertices will be created as more can be add or deleted when the program is running.

BTW, I tried first drawing a circle for each object of type vertex, and then displaying an image for each one and then both, hoping something else would show up. Just letting you know incase you're wondering why I have both.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
your problem is adding multiple panels to the main frame?

if so, where's the add code
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!