> Is there any way I can use the Graphics2D under the microsoft virtual
> machine?
No, there is no such thing in Microsoft's old and outdated VM.
> I have written a lot of Graphics2D which I can not really tak out
> my program (I am using the rotoate method).
rotate() just does some simple matrix operations. You can well implement
this by your own. Any good textbook on computer graphics will explain
the formulas to you. The FAQ of comp.graphics.algorithms has lots of
pointers to good books, maybe even the formulas. The used matrix is even
in the Java API documentation.
> Is there any way I can convert
> the code to Visual J+
J+ is not Java. It is based on old Java 1.1.x with some incompatible
changes. You have to write your own rotation.
> or Visual J#.net?
Not remotely Java. You have to rewrite everything.
> Would that work?
Why do you throw random technology names at use? Just because they have
a 'J' in the name?
What would you do if someone here says "J+? Sure, this works!". Would
you go out and blindly move your application to it, just to find out
later that you still have a problem? Could it be that exactly this
behavior (not researching in advance what is available on your target
platform) borough you in the sad position you are currently in?
You are well adviced for any programming task to research the
capabilities of your tools (especially the language) by your own in
advance. Just picking a name out of a head is not helpful. Yes, this is
work. You have to read books, read specifications and try to understand
things. It pays off in the end.
/Thomas
> Is there any way I can use the Graphics2D under the microsoft virtual
> machine? I have written a lot of Graphics2D which I can not really tak out
> my program (I am using the rotoate method).
G2D JDocs..
"..Java 2D API maintains compatibility with
JDK 1.1 rendering behavior, such that legacy
operations and existing renderer behavior is
unchanged under Java 2D API."
Now, since I could not see any specific reference
in the G2D docs for @since, I gave it the acid test..
<sscce>
import java.awt.*;
public class Graphic2Din1_1 extends Frame {
public void paint(Graphics g) {
Graphics2D g2d = (Graphics2D)g.create();
double d = 1.238765d;
g2d.rotate(d);
}
}
</sscce>
You can compile that code against
the _MS_ VM itself, here..
<http://www.physci.org/javac.jsp?bcp=MicrobaStard>
Here are some example of Applets that
work on the MSVM.
LiveGraphics3D..
<http://www.1point1c.org/model/saver2.jsp>
SpaceTethers
<http://www.1point1c.org/st/st.jsp>
(the latter may have some rendeing oddities,
but the source is there, anything in that source
will be available under 1.1)
> ..Is there any way I can convert
> the code to Visual J+ or Visual J#.net? Would that work?
Let's not get silly, now.. ;-)

Signature
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
Thomas Weidenfeller - 27 Apr 2004 12:38 GMT
> G2D JDocs..
> "..Java 2D API maintains compatibility with
> JDK 1.1 rendering behavior, such that legacy
> operations and existing renderer behavior is
> unchanged under Java 2D API."
You are mixing up forward and backward compatibility. Java 2 is backward
compatible, but 1.1.x is not forward compatible. He wants to have the
later, running a Java 2 features on a 1.1.x VM.
> Now, since I could not see any specific reference
> in the G2D docs for @since,
I wish there would be a way to convince the Sun programmers that proper
usage of @since is an absolute must (don't they have any QA?). Meanwhile,
http://javadiff.sourceforge.net/
is very useful.
> Let's not get silly, now.. ;-)
/Thomas
Andrew Thompson - 27 Apr 2004 13:35 GMT
> > G2D JDocs..
>> "..Java 2D API maintains compatibility with
[quoted text clipped - 5 lines]
> compatible, but 1.1.x is not forward compatible. He wants to have the
> later, running a Java 2 features on a 1.1.x VM.
What, Graphics2D.rotate(double)
for instance?
My point was that their seems to be
a Graphics2D.rotate( double ) method
_in_ the 1.1.4 MSVM.
Are we on the same page here, did I
get something completely wrong?
[ And yes, I noticed your other response
and was wonderring.. (while trying to juggle
a dozen other things) ]

Signature
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
Thomas Weidenfeller - 29 Apr 2004 08:21 GMT
> My point was that their seems to be
> a Graphics2D.rotate( double ) method
> _in_ the 1.1.4 MSVM.
Graphics2D was added in java 1.2. Your setup is broke. The MSVM (the
latest build 3810 at least) does not contain Graphics2D. Go to your
C:Windows\Java directory and examine the .zip files, especially the one
with the file name starting with 0 (or was it O?). There is no
java.awt.Graphics2D class file in the zips.
/Thomas
Andrew Thompson - 29 Apr 2004 08:45 GMT
>> My point was that their seems to be
>> a Graphics2D.rotate( double ) method
>> _in_ the 1.1.4 MSVM.
>
> Graphics2D was added in java 1.2. Your setup is broke. The MSVM (the
> latest build 3810 at least) does not contain Graphics2D.
You are indeed right, my apologies.
I compiled that 'against the MSVM in
my On-Line compiler' and it compiled
just fine, yet the MSVM jar does _not_
contain the G2D class.
Must be a mistake in my coding,
I'll look into it.

Signature
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology