B4J Question TextField Background Color

Toley

Active Member
Licensed User
Longtime User
I have a curious issue with TextField Background colors. In this simple example I simply place 3 text fields each with the following parameters. 1st one is R255, G0, B0, A50%, 2nd R0, G255, B0 A50% and the other one is the same with blue. And this what I get as resulting colors.



I also provide the sample test program.
 

Attachments

  • TextField.zip
    1.8 KB · Views: 530

stevel05

Expert
Licensed User
Longtime User
What version of B4j and Jdk are you using? My results are with B4j 4.70 and JDK 1.8.0_71

And what hardware?
 
Upvote 0

Toley

Active Member
Licensed User
Longtime User
I have reboot and I always got the same result. I can't believe it depends on my PC it's an almost new machine i7 @ 3.40 GHz with 16GB of RAM.
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
Just asking the easy questions first. This could be tricky. Have you noticed anything else unusual with the colours on other applications?
 
Upvote 0

Toley

Active Member
Licensed User
Longtime User
Don't worry this PC is a beast. it's a gamer machine it can play all the latest games without any color problem. I've try the program on my old laptop and it's OK so there is a compatibility issue somewhere. I will investigate that tomorrow.
 
Upvote 0

Toley

Active Member
Licensed User
Longtime User
The problem is in the Alpha parameter and it can also be seen on the Designer. As soon as the Alpha is not 100% (I've try with 99%) the text field disappear. This is not exclusive to Text Field, it apply also to any views that is color drawable like buttons and probably others.

P.S. For an unknown reason I cannot upload screenshots on this reply.
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
A quick search on google shows that there have been quite a few issues with Java on certain graphic cards. It is worth looking to see if yours is one of them. And of course make sure you have the latest drivers installed
 
Upvote 0

Toley

Active Member
Licensed User
Longtime User
Hi Erel thanks for taking care of this problem. I cannot say why it woks on some PC and not on some others, but I can assure you this problem is real. I was able to reproduce it on a Toshiba laptop also.

Yes it can be seen the WYSIWYG Designer too. Look at these 2 sceenshots one with alpha at 100% (OK) and one with alpha at 99% (the text field disappear).

 
Upvote 0

Toley

Active Member
Licensed User
Longtime User
Thanks for that info. When I add
B4X:
#VirtualMachineArgs: -Dprism.verbose=true

The log show that (I have apply color to the lines that appear red in the log)


Adding -Dprism.order=sw do not change anything but with -Dprism.order=j2d I have this result


This is different but still not what it is supposed to be. And the log show this:
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…