Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 139872 - Provide application templates for Applets
Provide application templates for Applets
Status: RESOLVED WONTFIX
Product: guibuilder
Classification: Unclassified
Component: App Framework
6.x
All All
: P3 (vote)
: TBD
Assigned To: issues@guibuilder
issues@guibuilder
:
: 49630 (view as bug list)
Depends on: 139865 139867
Blocks:
  Show dependency treegraph
 
Reported: 2008-07-14 13:19 UTC by Tomas Pavek
Modified: 2011-07-27 15:07 UTC (History)
3 users (show)

See Also:
Issue Type: TASK
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Pavek 2008-07-14 13:19:08 UTC
With fixed/enhanced applets in JDK 6 u10 and Web Start support in java project in NB 6.5 it would be nice to also
provide applet-based application using the Swing Application Framework.

In NetBeans the main technical blocker is that a project cannot be run as an applet - see issue 139867. It would be
silly to generate an application that cannot be run then. There is a workaround possible using Web Start, but that would
be strange to be used by default (anyway there's also issue 139865 which prevents it now).

In Swing Application Framework itself the problem is that it does not support applet-based applications yet. It is
technically possible to hack around it - make an applet be the class to start from which the application is launched in
its init method. (Separate Application subclass can be created which does nothing in its startup method.) The applet
itself is then also used as the main visual class designed in the GUI builder. This approach works, but has some cons
(besides the mentioned blockers):
- The setup is just a workaround for missing feature in SAF, not a good practice to promote.
- GUI builder fails showing menu (menu designer bug in applets).

This could perhaps work if we provided a very simple template bringing just an empty applet in which the user can use
the SAF features.

More elaborated template could be provided once applets are supported in SAF directly. Then also need to design the
template itself - how it should look like. Should an applet have menu bar and status bar just like the frame
application? Should it also support databases?
Comment 1 Petr Jiricka 2008-08-15 11:42:45 UTC
I agree this feature would be useful. Another part of the applet development workflow is a way to use applets in web
pages - I filed a separate issue 144037 for this.

Re support for databases - I must say I don't think this would be very useful. When an applet tries to connect to a
database on the server, it often needs to go through a firewall, and protocols used by JDBC drivers typically do not
pass through firewalls. Also, websites will not want to expose databases in front of the firewall as that would make
them vulnerable, databases are typically hidden behind a firewall and exposed through a server-side application. So, I
think REST web services is a better way to connect to backend data residing on the server.
(Well, unless you are talking about embedded Java databases such as Derby which run inside the applet for which there
may be *some* use cases, though in most cases server-side storage will be needed, which an embedded database can not
provide.)
Comment 2 Petr Jiricka 2008-09-24 16:33:31 UTC
See also a related issue 142386.
Comment 3 Jayashri Visvanathan 2008-12-23 23:26:26 UTC
*** Issue 49630 has been marked as a duplicate of this issue. ***
Comment 4 Jan Stola 2011-07-27 15:07:03 UTC
NetBeans support of Swing Application Framework has been discontinued => closing this issue as WONTFIX.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo