• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to draw antialiasing graphics if using Java 1.1 compiler?  RSS feed

 
Stanley Yu
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to draw antialiasing graphics, but I am using Java 1.1 compiler. Is there any way I can draw antialiasing graphics using 1.1 compiler? I know Graphics2D can draw antialiasing graphics, but 1.1 compiler cannot compile that.

Thanks!
 
Peter Lawrey
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use reflections to call any method or create an instance of any class if it exists and gracefully do something else if it does not.
Out of interest, do you really need to support 1.1 as 1.4 is EOL.
 
Stanley Yu
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Peter Lawrey:
You can use reflections to call any method or create an instance of any class if it exists and gracefully do something else if it does not.
Out of interest, do you really need to support 1.1 as 1.4 is EOL.


Peter,

My company is still using compiler 1.1 and will not upgrade to a newer compiler anytime soon due to stability reason.
Do you have any example about how to use reflections?
Let say I am currently drawing an non antialiasing oval:


I would like to have the antialiasing feature like:


But the 1.1 compiler doesn't support Graphics2D and RenderingHints. How to use reflections to do that?

Thanks so much!

Stanley
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's not the compiler that matters here so much, but the runtime. If you're using a Java 1.1 JVM to run your program, then the Graphics2D class simply won't be there.

"Stability" reasons? Like they need to run on an old, buggy JVM?
 
Stanley Yu
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ernest Friedman-Hill:
It's not the compiler that matters here so much, but the runtime. If you're using a Java 1.1 JVM to run your program, then the Graphics2D class simply won't be there.

"Stability" reasons? Like they need to run on an old, buggy JVM?



Hi Ernest,

Yeah, you are right. For those using Java 1.1 JVM will not have the antialiasing feature. For those who use newer JVM will have this feature. I just need to compile the code with 1.1 compiler and users will different JVM are atill able to run it.

Thanks!

Stanley
 
Stanley Yu
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone help or provide an example on how to code the following using reflection and is able to by compiled by Java 1.1?
Thanks so much!!

 
William P O'Sullivan
Ranch Hand
Posts: 859
Chrome IBM DB2 Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
reflection offers API commands to look inside a Class, extract properties and execute methods.

You will NOT be able to use anit-aliasing as already said as this feature is not in 1.1

You are being asked to race in the Daytona 500 using a Ford Model-T!

WP
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!