• Post Reply 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Painting graph and charts with Java.

 
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Everyone,


I read a lot of information that the Swing and AWT components should not be used together. I need to implement in my Java application that is based on SWING the possibility to draw graph and charts. I found that the Java 2D can be used for this. But it�s based on JDK 1.3 and based on the AWT components. And my application work with 1.4.
And my question is, are there are some Java libraries (from SUN), that I can use for drawing 2D graph and charts? Or can I use Java 2D with my Swing components together?

Thanks a lot for your help!
Regards,
Olena.
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can certainly combine Swing and AWT components in the same application, but you need to know what you're doing. The main issue is that a Swing component can't be "in front of" most AWT components; so, for example lightweight Swing menus and pop-ups won't be drawn properly on top of a Panel full of Buttons and Choice objects (as opposed to a JPanel filled with JButtons and JComboBoxes, the Swing eqivalent.)

Swing itself is drawn with Java2D. If you have a Java2D-based graph library, it's quite likely that it can be used to draw on a JPanel with little or no modification, anyway.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic