This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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: 19649
    
  18

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
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()
 
Consider Paul's rocket mass heater.
 
subject: hi please help with conversion from awt to swing
 
Similar Threads
How to use tables in AWT ?
GUI advice needed
Table Object
What is the difference between AWT and Swing?
heavy wt components