Jump to content
funtoo forums
  • 0
nigga-china

Java components doesn't show up on the screen

Question

Some Java components as JLabel, JButton and many others is not showing up on the JFrame. If I set a text to a button, it doesn't appear in the screen. I suspected that this issue is because the default font used by Java is not installed so I tried to change the font used in the components but once again it didn't show up anything. I checked if it was due to bad code or something like this but was not the case, also I used codes from the internet and none worked.

I really don't have another idea of how to solve this and I'm worried because I need to practice Java UI due to I'm studying an OOP subject in the college. If someone help me I'd really appreciate.

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 1

I remember running into this a few years ago. There is an environment variable that can be set that sometimes works:

https://wiki.archlinux.org/index.php/Dwm#Fixing_misbehaving_Java_applications

_JAVA_AWT_WM_NONREPARENTING=1

This is supposed to tell AWT to behave under a non-reparenting WM, such as dwm. Drop that into a file under /etc/env.d, and then run env-update.

Share this post


Link to post
Share on other sites
  • 0
21 hours ago, klipkyle said:

I remember running into this a few years ago. There is an environment variable that can be set that sometimes works:

https://wiki.archlinux.org/index.php/Dwm#Fixing_misbehaving_Java_applications


_JAVA_AWT_WM_NONREPARENTING=1

This is supposed to tell AWT to behave under a non-reparenting WM, such as dwm. Drop that into a file under /etc/env.d, and then run env-update.

Thank you! It solved my issue. :><33

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...