Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-17-2009, 04:57 AM
dbashby's Avatar
Senior Member
 
Join Date: Mar 2009
Posts: 222
Rep Power: 2
dbashby is on a distinguished road
Question convert application to applet in netbeans
I have managed to locate a tutorial that explains in a way that I understand how to create an applet in netbeans.

Code:
http://blogs.sun.com/pc/entry/how_to_create_applet_with
however I cannot find one that enables you to convert a current completed application in netbeans to an applet.

Can anyone suggest any apart from netbeans.

Thanks in advance
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 04-17-2009, 04:11 PM
Fubarable's Avatar
Moderator
 
Join Date: Jun 2008
Posts: 6,483
Rep Power: 8
Fubarable is on a distinguished road
Default
Does your netbeans application subclass JFrame? If so, re-write it so that it subclasses JPanel (or better, produces a JPanel). Then you can place this JPanel into a JFrame or a JApplet as you desire.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 04-17-2009, 04:50 PM
dbashby's Avatar
Senior Member
 
Join Date: Mar 2009
Posts: 222
Rep Power: 2
dbashby is on a distinguished road
Default
I have to admit you have lost me, my application is structured using a number of classes with a Main and a Jpanel gui.

Does this answer what you are asking me

We are not actually being taught java, apparently the methodology is more important, education in the uk is so wonderful!
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 04-17-2009, 07:45 PM
Senior Member
 
Join Date: Sep 2008
Posts: 564
Rep Power: 2
emceenugget is on a distinguished road
Default
i suppose it's a trade off for your class, then. when in class, would you rather learn a specific shortcut to convert a swing app into an applet, or actually learn concepts that will help you organize your thoughts, encourage you to research more, and overall make you a better programmer?
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 04-17-2009, 07:52 PM
dbashby's Avatar
Senior Member
 
Join Date: Mar 2009
Posts: 222
Rep Power: 2
dbashby is on a distinguished road
Default
I would prefer the having some idea of what we are doing rather than just going through the motions however I am trying to pick up more information regarding Java but this is as well as doing the work required.
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 04-17-2009, 09:20 PM
OrangeDog's Avatar
Senior Member
 
Join Date: Jan 2009
Location: Cambridge, UK
Posts: 838
Rep Power: 2
OrangeDog is on a distinguished road
Default
Have a method that creates the GUI and returns a JPanel. Have your main class subclass JApplet. Then use init() to add the JPanel to getContentPane() and use main() to add the JPanel to a new JFrame.

Bingo - an applet and an application
__________________
Don't forget to mark threads as [SOLVED] and give reps to helpful posts.
How To Ask Questions The Smart Way

Last edited by OrangeDog; 04-18-2009 at 04:22 AM.
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 04-18-2009, 04:14 AM
Fubarable's Avatar
Moderator
 
Join Date: Jun 2008
Posts: 6,483
Rep Power: 8
Fubarable is on a distinguished road
Default
Yep, I agree 100% with OrangeDog. Creating your GUI this way will give you loads of flexibility. Shoot you can even place your GUI into the JPanel of another GUI if you so desire.
Bookmark Post in Technorati
Reply With Quote
  #8 (permalink)  
Old 04-18-2009, 04:49 AM
dbashby's Avatar
Senior Member
 
Join Date: Mar 2009
Posts: 222
Rep Power: 2
dbashby is on a distinguished road
Thumbs up
Ok thanks, if I have any problems 'I will be back'
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting an Application to an Applet in NetBeans RaefWolfe NetBeans 1 03-27-2009 06:47 PM
Convert to Applet Urgle New To Java 1 11-12-2008 02:15 PM
Convert the application from 9i to 10g rahul999 Database 5 09-03-2008 04:55 PM
How to convert batch application to server app? johann_p New To Java 0 03-28-2008 10:39 PM
Convert a program to Applet carl Java Applets 2 08-09-2007 10:33 PM


All times are GMT +2. The time now is 07:25 AM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org