any suggestion on drawing figure of stock-price

J

John

I'm going to implement a small open-source project, which provides a static
diagram demonstrating a few of stocks pricing in the pass.

The problem for me is,
1. which java.packages are the exact one I need, or where to find a similar
example (SUN's web seems hot providing such example). BTW, I code for
server-side for serveral years.

2. JApplet is good choice, but most browsers support just basic Applet not
JApplet. if I have to use JApplet, how to let ended-users know how to fix
it; if using Applet, any big disadvantage with regards to this project?
 
V

VisionSet

John said:
I'm going to implement a small open-source project, which provides a static
diagram demonstrating a few of stocks pricing in the pass.

The problem for me is,
1. which java.packages are the exact one I need, or where to find a similar
example (SUN's web seems hot providing such example). BTW, I code for
server-side for serveral years.

2. JApplet is good choice, but most browsers support just basic Applet not
JApplet. if I have to use JApplet, how to let ended-users know how to fix
it; if using Applet, any big disadvantage with regards to this project?

If the diagram is relatively static, why not use Java server side to
generate the graphics, save as an image file and make this available to the
client?
 
J

John

VisionSet said:
If the diagram is relatively static, why not use Java server side to
generate the graphics, save as an image file and make this available to the
client?
Thanks Mike.
The problem to me were
1. the project should be flexible enough to convert various data (like a set
of 10 days or 15 days)
2. which packages of Java, like 2d, or awt are appropriate to generate the
chart/diagram
 
R

Roedy Green

Unless you have a very fast connection that would be considerably
slower than sending the raw data and rendering it in the Applet.

You can render a giant bit map in the applet and pan over it, or
update just parts of it if you want great speed.
 
R

Roedy Green

2. which packages of Java, like 2d, or awt are appropriate to generate the
chart/diagram

If you have a particular look you want, these are so easy to do with
draw commands, it may be easier than fighting with a charting package.

The chart package is when you are happy to go along with their
formatting.
 
A

Andrew Thompson

I'm going to implement a small open-source project, which provides a static
diagram demonstrating a few of stocks pricing in the pass.

As Mike W. (VisionSet) explained, you
will reach the greatest audience if you
produce *images* for the browser.

That being said, I will discusss the
'applet' approach.
The problem for me is,
1. which java.packages are the exact one I need, or where to find a similar
example (SUN's web seems hot providing such example). BTW, I code for
server-side for serveral years.

Roedy has already mentioned some Java classes for
graphics, I will simply add this suggestion..
<http://www.physci.org/guifaq.jsp#4.2>

You could use JFreeChart either on the server
to produce images, or in an applet on the client
side.
2. JApplet is good choice, but most browsers support just basic Applet not
JApplet.

You are thinking of Internet Explorer, but the
problem is that there are also IE6 versions that
have _no_ Java 1.1! Especially since I made a
utility that can rip the 1.1 straight from under IE.
<http://www.physci.org/jvmclean.jsp>
People are rushing to download the cleaner,
so you cannot rely on that broken Microsoft
Java much longer.

You may as well go JApplet or bust.

Some people even refuse Java altogether
because they consider it unsafe, or the
library or internet cafe through which
they *browse* thinks it is unsafe, so I
say have JApplets or use an image.
..if I have to use JApplet, how to let ended-users know how to fix
it;

JavaVersionApplet
...if using Applet, any big disadvantage with regards to this project?

People who either will not, or cannot, use Java.

HTH
 
R

Roedy Green

Some people even refuse Java altogether
because they consider it unsafe,

This is so stupid. Nothing has been invented that is safer.

Flash now has tools for ads to secretly turn on your webcam or
microphone and spy on you.

And people call Java dangerous!!
 
L

Liz

Roedy Green said:
This is so stupid. Nothing has been invented that is safer.

Flash now has tools for ads to secretly turn on your webcam or
microphone and spy on you.

And people call Java dangerous!!

I think it depends on who your customers are. When I started to
use Java 2 I found very soon that a vast majority of end users
only have support for the version of Java that came with their
computer when they bought it. And their willingness to install
some new package just to see my stuff was zero. So they told me
"all I see is a grey square, you better fix it."
 
A

Andrew Thompson

I think it depends on who your customers are. When I started to
use Java 2 I found very soon that a vast majority of end users
only have support for the version of Java that came with their
computer when they bought it. And their willingness to install
some new package just to see my stuff was zero. So they told me
"all I see is a grey square, you better fix it."

Yes, a web site author *should* provide
their visitors with something better
Liz. A web page that produces a big grey
square *is* broken.

Sun made the HTMLConverter to avoid this,
whereas I have a better (%100 Java) solution
in the JavaVersionApplet.

Instead of the 'blank grey square' the user
gets moved to a different page that explains
how to get the wonderful applet they wanted.

See it explained here..
<http://www.physci.org/codes/jre.jsp>

I think most applet authors fall down when
it comes to the most important part of an
applet - the web page that it lives in. :-(
 
L

Liz

Andrew Thompson said:
Yes, a web site author *should* provide
their visitors with something better
Liz. A web page that produces a big grey
square *is* broken.

Sun made the HTMLConverter to avoid this,
whereas I have a better (%100 Java) solution
in the JavaVersionApplet.

Instead of the 'blank grey square' the user
gets moved to a different page that explains
how to get the wonderful applet they wanted.

I don't follow. If the applet is written in Java 1.4.2
won't it still not work if it is on another page?
 
A

Andrew Thompson

I don't follow. If the applet is written in Java 1.4.2
won't it still not work if it is on another page?

E.G.
If you had 1.4 installed, and this page required 1.5,
<http://www.physci.org/codes/jretest.jsp?v=15>
you would end up here..
<http://www.physci.org/codes/oldjava.jsp>

Web designers who use applets can use the JVA to
send the visitor to a page that explains they need
the Sun Java to view it, like I have, or you
_could_ redirect them straight to here..
<http://java.com/en/index.jsp>
(though I think that is a bit rude)

...Or to any page of your (the web designers)
choosing.

The point is, the user does not have to see the
'grey square', but instead gets an explanation
of the exciting, new, _free_ plug-in they are about
to get so they can see your wonderful applet.

Of course, sometimes even that will not work,
the user may still be unwilling, or _unable_
(Library, College, Internet Cafe, Corporate
Intranet..) to load Java, but at _least_ they are
not left staring at the dreaded 'blank grey
square', because that simply means 'broken page,
surf elsewhere'.. to the user or visitor.

My point is that it is up to the web-designer
and applet author to ensure the visitor is _never_
left in that position.

That is why I wrote the JavaVersionApplet
for web-page designers to put in their webpages.
'No grey, blank square'

_I_ would consider such a web page/applet
to be broken, so I can understand the visitor's
point of view.
 
A

Andrew Thompson

that requires at least a minimal working java. Is there a way of
testing and giving a sensible error when they have no working Java at
all?


The JavaVersionApplet, in conjuction with the
'alt' attribute and 'nojava' defined is about
the best I can so far get.. E.G.

The applet call I use here..
<http://www.1point1c.org/st/st.jsp>

<applet
codebase="."
code="spacetethers.Applet1.class"
archive="spacetethers.jar"
name="spacetethers"
width="100%"
height="475"
hspace="0"
vspace="0"
alt="Java is DISABLED. The Java applet
in this page will not work until Java is enabled!"SpaceTethers simulator appears here in Java enabled browsers!
</applet>

In Mozilla, with Java disabled, you get the message
"Java is DISABLED. The Java applet
in this page will not work until
Java is enabled!"

In a very OLD browser you might get..
"SpaceTethers simulator appears
here in Java enabled browsers!"

You might make either of those a link to
give the user further information.

But the user may also take the hint from
"Java is DISABLED. The Java applet
in this page will not work until
Java is enabled!" ...to say to the SysAdmin -
"we need Java enabled on our system so I can
effectively do my study / work / rocket science."

That three level cascading degrade is the
best I have yet seen..

[ Note this page does not use the
JavaVersionApplet since the SpaceTethers
applet it uses, should work with 1.1 VM's ]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top