Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. try {
  2. UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
  3. System.out.println(UIManager.getColor("TableHeader.background"));
  4. catch (Exception e) {
  5. e.printStackTrace();
  6. }
  7.  
  8. UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
  9.  
  10. UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
  11.  
  12. try {
  13. UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
  14. System.out.println(UIManager.getColor("TableHeader.background"));
  15. } catch (Exception ex) {
  16. // HANDLE EXCEPTION
  17. }
  18.  
  19. try
  20. {
  21. System.out.println(UIManager.getColor("TableHeader.background"));
  22. UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
  23. System.out.println(UIManager.getColor("TableHeader.background"));
  24. }
  25. catch (Exception e) { e.printStackTrace(); }
  26.  
  27. javax.swing.plaf.ColorUIResource[r=238,g=238,b=238]
  28. javax.swing.plaf.ColorUIResource[r=240,g=240,b=240]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement