• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to draw antialiasing graphics if using Java 1.1 compiler?

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!!

 
Ranch Hand
Posts: 859
IBM DB2 Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
You totally ruined the moon. You're gonna hafta pay for that you know. This tiny ad agrees:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic