File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Turning app from JFrame to JPanel

 
Dave Johnson
Ranch Hand
Posts: 111
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Got this app that is clock. I want to put the clock into my program as part of the exsisting layout. The clock is currently a JFrame I want to the clock as a JPanel instead.
Here is the code:

Could anyone show me what alterations are necessary to the code? Also what code is needed to add it to the JFrame on the main program i.e. will I need to setSize() or anything?
Thanks, Dave.
[ January 07, 2004: Message edited by: Dave Johnson ]
 
Brian Pipa
Ranch Hand
Posts: 299
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you look at the code carefully, you will see it is actually already a panel (ClockPanel). There are many ways to change it. Here is one:

[ January 08, 2004: Message edited by: Brian Pipa ]
 
Dave Johnson
Ranch Hand
Posts: 111
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry I am so late but thankyou very much Brian!!!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic