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 hi please help with conversion from awt to swing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "hi please help with conversion from awt to swing" Watch "hi please help with conversion from awt to swing" New topic
Author

hi please help with conversion from awt to swing

sakshi saw
Greenhorn

Joined: Jun 06, 2009
Posts: 6
hi
i have an application in awt
which i need to convert to swing

i have a Canvas on which lines are to be drawn so which swing component do you guide

is it JPanel and what should i use for drawing lines which graphics class

please reply soon

Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 20048
    
  30

sakshi saw wrote:hi
i have an application in awt
which i need to convert to swing

i have a Canvas on which lines are to be drawn so which swing component do you guide

is it JPanel and what should i use for drawing lines which graphics class

You should override the paintComponent method:


please reply soon

http://faq.javaranch.com/java/EaseUp


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
use a JPanel, and do your graphics in an overridden paintComponent()
 
Don't get me started about those stupid light bulbs.
 
subject: hi please help with conversion from awt to swing
 
It's not a secret anymore!