aspose file tools
The moose likes Beginning Java and the fly likes Swing GUI Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic
Author

Swing GUI

paramu iyer
Greenhorn

Joined: May 13, 2006
Posts: 24
I am new to java Swing. My requirement is to draw a use case diagram using swing. for this I have to draw rectangles , Circles , triangles etc and appropriately connect them with the lines.

Also inside these shapes I have to write the texts. Is there any easier way to write the texts inside these figures so that when ever the figure enlarges these texts also gets wrapped accordingly?

What I am currently doing is drawing rectangle with certain coordinates , width , height etc and then writing text using drawString by adjusting the coordinates in such a way that they do not go outside the figure.

Any other easier ways or suggestions would be of great help....
Thanks
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8259

Please do not post the same question in multiple forums. It causes confusion and duplication of effort as the community tries to help everyone.


"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: Swing GUI
 
Similar Threads
Pixels on applets
Drawing JTextField on Graphics Context
Draw a curve in Java if only have 3 coordinates known.....Help !!
Swing GUI
Pixels on applets