Hi !
Featured games (85)
games approved by the League of Dukes
Games in Showcase (623)
Games in Android Showcase (176)
games submitted by our members
Games in WIP (676)
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 11593 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.

Offline Riven
« League of Dukes »

« JGO Overlord »

Medals: 1054
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).

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.

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.

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.

Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

BurntPizza (27 views)
2015-10-08 03:11:46

BurntPizza (16 views)
2015-10-08 00:30:40

BurntPizza (19 views)
2015-10-07 17:15:53

BurntPizza (32 views)
2015-10-07 02:11:23

KaiHH (37 views)
2015-10-06 20:22:20

KaiHH (16 views)
2015-10-06 19:41:59

BurntPizza (32 views)
2015-10-06 19:04:48

basil_ (46 views)
2015-09-30 17:04:40

shadowstryker (24 views)
2015-09-29 15:55:06

TheSpaceHedgehog (31 views)
2015-09-29 01:58:48
Math: Inequality properties
by Roquen
2015-10-01 13:30:46

Math: Inequality properties
by Roquen
2015-09-30 16:06:05

HotSpot Options
by Roquen
2015-08-29 11:33:11

Rendering resources
by Roquen
2015-08-17 12:42:29

Rendering resources
by Roquen
2015-08-17 09:36:56

Rendering resources
by Roquen
2015-08-13 07:40:51

Networking Resources
by Roquen
2015-08-13 07:40:43

List of Learning Resources
by gouessej
2015-07-09 11:29:36 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!