This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Grokking Bitcoin and have Kalle Rosenbaum on-line!
See this thread for details.
Win a copy of Grokking Bitcoin this week in the Cloud/Virtualization forum!
    Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
  • Carey Brown
  • salvin francis
  • Claude Moore

Swing GUI  RSS feed

Posts: 24
  • Mark post as helpful
  • send pies
  • Report post to moderator
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....
Ranch Hand
Posts: 15304
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Interesting not that you simply reposted this question which is a big no no, but that you included less information. I am closing this thread. Please don't post the same question more than once.

It is sorta covered in the JavaRanch Style Guide.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!