File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Trying to finish program Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "Trying to finish program" Watch "Trying to finish program" New topic
Author

Trying to finish program

Stephen Norris
Ranch Hand

Joined: Oct 27, 2003
Posts: 44
I have written most of the code, but i have to get a JComboBox to display four shapes (circle, square, oval, and rectangle), then it has to draw that shape in the allotted space. The shapes have to be placed randomly around the window. I don't where in my program to place this part so that it will work and I don't know what to put in there so that it will be random spots. If someone could just help me with the circle part, then I could figure out the other shapes, I think. Here is the program:
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8259

The Java Tutorial on Performing Custom Painting covers the coordinate system (you'll need to understand it so you can randomize positions) and implementing custom components (which you'll need to understand so you can display those random shapes).


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Trying to finish program
 
Similar Threads
Help with drawing random shapes based on JComboBox
Need to finish my program, but lost
Please Help?
Using Multiple JComboBoxes
I can't load a file with getResource