Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (523)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (592)
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 8812 times)
0 Members and 1 Guest are viewing this topic.
Offline gouessej
« Posted 2014-07-30 12:55:31 »

Hi

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?
https://bugzilla.redhat.com/show_bug.cgi?id=1124374

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: 832
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 »

Hi

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 »

Hi

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:
-Dsun.java2d.xrender=True

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 libXrender.so is detected as 0.98
XRender pipeline enabled
Xrender: INFO: Jules library not installed.

Pages: [1]
  ignore  |  Print  
 
 

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

SHC (24 views)
2014-11-25 12:00:59

SHC (23 views)
2014-11-25 11:53:45

Norakomi (19 views)
2014-11-25 11:26:43

Gibbo3771 (22 views)
2014-11-24 19:59:16

trollwarrior1 (36 views)
2014-11-22 12:13:56

xFryIx (74 views)
2014-11-13 12:34:49

digdugdiggy (52 views)
2014-11-12 21:11:50

digdugdiggy (46 views)
2014-11-12 21:10:15

digdugdiggy (41 views)
2014-11-12 21:09:33

kovacsa (68 views)
2014-11-07 19:57:14
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org 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‑gaming.org
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!