Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Graphics - Swing or 2D What's best  RSS feed

 
Jof Gronning
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm developing a graphics editor and I'm not sure if I should be using 2D or swing (extending JComponent).
From what I can see 2D has a richer API. Being new to Java I'm also a bit confused about 2d (heavyweight) and Swing (lightweight) component.
Am I right to assume that I should not put 2D objects into a JPanel (light) container. Should I be using Panel for my 2D object?
I also plan to use a svg file format. Does anyone know of any sample code on Graphics editors that can help me get started?
Appreciate any help or ideas on this topic.
Thanks.
 
narasimharao konjeti
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
swing 2D is best, it is fast disply rather then, graphics api.
bye
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Graphics2D can be used with either AWT or Swing... in fact Swing makes more use of Graphics2D than AWT.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!