Re: Swing better than Awt?



Richard Maher wrote:
But before launching into Swing there is one niggle or possible
spanner-in-the-works I'd like to quiz you about, and that is "footprint"
both in terms of memory and bandwidth of a Swing evoking class. In my case
I'm using an Applet that does little more user interaction than pop-up a
couple of dialog boxes before handing control over to the web browser and
html, and find AWT to be a stream-lined gazelle-like creature (albeit
three-legged) and fear Swing could be more like an elephant. Are my fears
ill-founded? Are all the class libraries in the JVM anyway so don't have to
be sent over the network? Will my Class and JAR files be roughly the same
size? Is relative resource consumption (or body mass index) an issue?

The Swing classes has been part of Java since version 1.2.

Your code may actually shrink a little bit in size because
you may replace some of your code with builtin Swing functionality.

Swing apps do tend to use some memory. But would not consider it
a problem on any PC that is not completely outdated.

PPS. If I was holding a series of say employee photographs/images as blobs
in a database, can anyone tell me how I would get one of them up into a
web-browser without first having to export it to a .jpeg/.bmp/.gif file? I
must have missed something? I know http servers/browsers are optimized to
have seperate threads for uploading images but nonetheless, what's the
alternative? Can I pass an BufferedImage back from an applet to Javascript?
(And then what would it do with it without a SRC="#something"?)

You can do a IMG tag with SRC pointing to a server side script that
sends the image from the database to the browser with the correct
content type.

Or you can use an applet that retrieves the images via socket
and displays it within the applet.

Arne
.



Relevant Pages

  • Re: New applet project
    ... A web start application (or applet) ... object moving in a window; I have also some text attached to this work ... Note that (java.awt.)Canvas is part of the AWT, ... looking to Swing for good GUI's. ...
    (comp.lang.java.help)
  • Re: JScrollPane in Applet
    ... The convention for class names in Java is to have ... Note that Applet is an AWT based class (even though ... ..but both JTable and JScrollPane are part of Swing. ... Swing and AWT ...
    (comp.lang.java.gui)
  • Re: Class not found on other computers
    ... >> is 'Applet not inited', ... Swing then. ... There are various things in AWT ... > swing elements to do this too. ...
    (comp.lang.java.help)
  • Re: problem regarding dBase connectivity with Applet
    ... Airline Information system project dBase connectivity. ... Initially we made GUIs using swing in 1st Iteration. ... We were left only with two options to make project either in Applet ...
    (comp.lang.java.gui)
  • Re: Why is Applet Slower than Application?
    ... does not allow a process to take more than 4 GB of virtual memory. ... This is not a limitation limited by Java, or by the applet model, but by the OS and system configuration. ... I would like to point out the issue of haphazard capitalization again. ...
    (comp.lang.java.programmer)