Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (739)
Games in Android Showcase (224)
games submitted by our members
Games in WIP (820)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Graphics2D.drawLine() wrongly draws the first (or the last) point  (Read 30577 times)
0 Members and 1 Guest are viewing this topic.
Offline gouessej
« Posted 2014-07-30 12:55:31 »


I draw a diagonal cross in the right side of each tab in a JTabbedPane and as you can see, there is something wrong:

It seems to be reproducible only on a very few GNU Linux distros with OpenJDK. Please can anybody run some of the test cases we posted in the bug report below?

It's not reproducible with Oracle Java. I reproduce this bug under Mageia Linux 4 with OpenJDK 1.7 update 65 but someone else doesn't reproduce this bug with the same version of OpenJDK under Fedora Linux 20 and 21.

Best regards.

Julien Gouesse | Personal blog | Website | Jogamp
Offline Riven

« JGO Overlord »

Medals: 1313
Projects: 4
Exp: 16 years

Hand over your head.

« Reply #1 - Posted 2014-07-30 12:58:28 »

Interesting bug. It's probably not worth waiting for the fix. Such bugs are solved at glacial speeds.

Obvious workaround: use icons, in this specific case.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings!
Offline gouessej
« Reply #2 - Posted 2014-07-30 13:34:51 »

I hope I won't have to fix it by myself. Nobody answered me on the OpenJDK Java2D mailing list  Sad

Yes I can use an ImageIcon or draw in a BufferedImage and draw this BufferedImage in the right side of the tab.

I don't want to stop using Swing, I don't want to spend several months in porting JFPSM to another API Sad (even though LibGDX Scene2D seems to be really cool).

Julien Gouesse | Personal blog | Website | Jogamp
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline gouessej
« Reply #3 - Posted 2014-08-01 19:50:23 »

This bug only concerns Mageia Linux, it's not very important. It shouldn't be very hard to fix as it works under Fedora and SUSE.

Julien Gouesse | Personal blog | Website | Jogamp
Offline gouessej
« Reply #4 - Posted 2014-08-04 09:34:15 »


Actually, this bug comes from the old X11 renderer which isn't used by default in OpenJDK 1.8 which uses the XRender pipeline. Riven is right, it will never be fixed but the XRender pipeline doesn't have it.

If you're forced to use Java 1.7, enable the OpenGL pipeline by using -Dsun.java2d.opengl=True (but it might expose you to some other bugs). Otherwise, switch to OpenJDK 8.

Julien Gouesse | Personal blog | Website | Jogamp
Offline gouessej
« Reply #5 - Posted 2014-08-06 11:21:49 »


Actually, as the XRender pipeline is available in OpenJDK 1.7 but only enabled by default in OpenJDK 1.8, enabling it seems less dangerous than enabling the build-in OpenGL pipeline:

I'll test this pipeline with OpenJDK 1.7 during some days to see whether it is viable as I don't want to switch to OpenJDK 1.8 now.

Edit.: It seems to work:
INFO: The version of is detected as 0.98
XRender pipeline enabled
Xrender: INFO: Jules library not installed.

Julien Gouesse | Personal blog | Website | Jogamp
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

Ecumene (53 views)
2017-09-30 02:57:34

theagentd (76 views)
2017-09-26 18:23:31

cybrmynd (184 views)
2017-08-02 12:28:51

cybrmynd (182 views)
2017-08-02 12:19:43

cybrmynd (189 views)
2017-08-02 12:18:09

Sralse (198 views)
2017-07-25 17:13:48

Archive (747 views)
2017-04-27 17:45:51

buddyBro (881 views)
2017-04-05 03:38:00

CopyableCougar4 (1429 views)
2017-03-24 15:39:42

theagentd (1319 views)
2017-03-24 15:32:08
List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05

SF/X Libraries
by SkyAphid
2017-03-02 06:38:56

SF/X Libraries
by SkyAphid
2017-03-02 06:38:32

SF/X Libraries
by SkyAphid
2017-03-02 06:38:05

SF/X Libraries
by SkyAphid
2017-03-02 06:37:51 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!