2

I want to show some kind of information in a JTreeTable and start off with a JDialog, where something is written in JLabels (i think, that's the more unimportant fact).

The problem is, that my JLabel is not shown correctly, there are missing some details (see picture).

enter image description here

I already tried out three kinds of solution:

1.) Working with Runnable,.setLookAndFeel, and .invokeLater:

public NoDataWarningView() {
    Runnable gui = new Runnable() {

        public void run() {
            try {
                UIManager.setLookAndFeel(UIManager
                        .getSystemLookAndFeelClassName());
            } catch (Exception e) {
                e.printStackTrace();
            }
            JOptionPane.showMessageDialog(null,
                    "Some kind of text or information.",
                    "Warning",                        
                        JOptionPane.WARNING_MESSAGE);

        }
    };
    SwingUtilities.invokeLater(gui);
}

2.) Renew the font, before the text is written. It works, but the "OK!" from the button is still missing. Referenced Question

public static void setUIFont (javax.swing.plaf.FontUIResource f){
    java.util.Enumeration keys = UIManager.getDefaults().keys();
    while (keys.hasMoreElements()) {
      Object key = keys.nextElement();
      Object value = UIManager.get (key);
      if (value != null && value instanceof javax.swing.plaf.FontUIResource)
        UIManager.put (key, f);
      }
} 
  1. Deleted a Font-File, because it seems, Java-Fonts were corrupt with Windows-Fonts and restarted. Had no effect. Referenced Question

To rebuild the cache: as administrator, delete this file and reboot the PC:

del %WINDIR%\System32\FNTCACHE.DAT

Somebody has a clue concerning the solution?

Community
  • 1
  • 1
Gary Klasen
  • 1,001
  • 1
  • 12
  • 30
  • 2
    Possible [duplicate](http://stackoverflow.com/q/22737535/230513); reference [example](http://stackoverflow.com/a/24875960/230513). – trashgod Jun 09 '15 at 10:29
  • You're right, i didn't see that one. Could be merged with comments that the three ways above didn't help. – Gary Klasen Jun 09 '15 at 11:32
  • Thanks; sometimes it's hard to distinguish driver vs. synchronization problems. Let me know if this question needs to be re-opened. – trashgod Jun 09 '15 at 15:53
  • The downgrade to JDK 1.7 was successful! So it does not need to be reopened. – Gary Klasen Jun 09 '15 at 17:13

0 Answers0