Results 1 to 3 of 3
Like Tree3Likes
  • 2 Post By gianluca1979
  • 1 Post By DarrylBurke

Thread: some several questions about java graphics programming and cross-platform issues

  1. #1
    gianluca1979 is offline Member
    Join Date
    Dec 2011
    Posts
    2
    Rep Power
    0

    Default some several questions about java graphics programming and cross-platform issues

    Hi all,

    I'm new to this forum, and one year ago I just started to use Java and abandoned .NET/C#.
    I'm pretty satisfied of the results reached in Java, expecially because I'm developing without use spaghetti-programming that I used to with .NET/C#. Anyway, I'm facing some problems about graphics programming in Java, in particular:

    * I noticed a difference between font rendering in Java and in .NET/C# or any other win32 native programming tool. In particular, I noticed that the fonts rendered in Java are more smoothed in respect to the win32 ones, regardless of the font face and font size chosen. The result is that the Java app. that uses, for example, Verdana with size 8, is less "readable" because of the smooth effect that is caused by anti-aliasing (example: the middle line in the 'S' character is almost invisible, instead in .NET, with the same font, is readable). Is there a way to modify the behaviour of the rendering or I have to take the result as is?

    * I'm currently using the JDK6 last update version, and, in order to make windows transparent and shaped, I'm using the AWTUtilities class, that obviously is not standard and it appears to work correctly only on Windows (I just had the opportunity to run it on Linux, and the window is flat as a plane). Is there an alternative to AWTUtilities? Maybe should I have to use JDK7? In particular, I need that the app. must run on Windows and Mac OS.

    I have other questions too, but they are minor. I effectively need to know if I can solve the two previous issues.

    Thank you in advance.
    2by4 and Fubarable like this.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,452
    Rep Power
    20

    Default Re: some several questions about java graphics programming and cross-platform issues

    Is there a way to modify the behaviour of the rendering
    Controlling Rendering Quality (The Java™ Tutorials > 2D Graphics > Advanced Topics in Java2D)

    Is there an alternative to AWTUtilities? Maybe should I have to use JDK7?
    Yes.

    db
    Fubarable likes this.
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    gianluca1979 is offline Member
    Join Date
    Dec 2011
    Posts
    2
    Rep Power
    0

    Default Re: some several questions about java graphics programming and cross-platform issues

    thank you, DarrylBurke, I managed to solve the anti-aliasing problem with your help. Effectively, I was just using the standard ANTIALIASING_ON value for anti-aliasing, completely forgetting that there was other options...

    About JDK, maybe I understood bad, but I saw that the JDK7 is fully implemented only for Win32 and other OS, while for Mac OS is still in progress, so I don't know if I'm in good hands if, just changing JDK for my project to JDK7 and using the new functions, it will run currently on both Win32 and Mac OS without side-effects.

    I have another question too. In my applications, I have several panels, i.e. several JPanels created in the main form and, with use of combo boxes, I show and hide them one by one (for example: combo box choose 1 -> show panel1, combo box choose 2 -> show panel2, and so on...). The JPanels are just created in the main form constructor, but when they appear in the form, their appaearance is inconsistent in term of look&feel. In particular, the first JPanel created (that it's the first visible one too when the app. starts) has a fixed look&feel (that I presume is the Java one), while the other JPanels created has the system default look&feel. Even with setting the look&feel with project settings, the result is the same. What can I do?

    Thank you in advance.

Similar Threads

  1. Replies: 0
    Last Post: 12-08-2011, 01:43 PM
  2. Problem with Graphics OO programming Java.
    By Martino in forum Java 2D
    Replies: 2
    Last Post: 04-27-2011, 03:33 PM
  3. java with cross-platform
    By rupeshnerkar in forum Advanced Java
    Replies: 1
    Last Post: 10-08-2010, 10:06 PM
  4. cross platform architecture in Java/J2ee
    By softbuzz in forum Introductions
    Replies: 0
    Last Post: 01-09-2010, 09:03 AM
  5. JAVA a cross-platform language? I have my doubts!
    By willemjav in forum Advanced Java
    Replies: 34
    Last Post: 10-25-2008, 12:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •