-
Bug
-
Resolution: Unresolved
-
P4
-
None
-
6
-
x86
-
solaris_2.5.1
FULL PRODUCT VERSION :
jdk 1.6
ADDITIONAL OS VERSION INFORMATION :
In Redhat Linux
EXTRA RELEVANT SYSTEM CONFIGURATION :
If a new font is set using UIManager.put(.key, new Font(.....) ,
A DESCRIPTION OF THE PROBLEM :
GTKLookAndFeel ignores this new font and shows the screens in the desktop font set in the OS. If some other look and feels is selected (Motif) changes in the font can be noticed in the screen displayed subsequently.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Execute the following code snippet.
-------------
UIManager.put("Label.font", null);
UIManager.put("Label.font", UIManager.get("List.font"));
UIManager.put("Label.font", new Font("Serif", Font.BOLD, 25));
//System.out.println(UIManager.getCrossPlatformLookAndFeelClassName());
//UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
System.out.println(UIManager.getSystemLookAndFeelClassName());
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
JPanel panel =new JPanel( );
panel.add(new JLabel("Test Me"));
JFrame window=new JFrame("Test Fonts");
window.getContentPane().add(panel);
window.setSize(new Dimension(100,100));
window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// ..
// ..
window.setVisible(true);
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The text displayed in Big and Bold Font.
ACTUAL -
The text displayed in normal Font.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
UIManager.put("Label.font", null);
UIManager.put("Label.font", UIManager.get("List.font"));
UIManager.put("Label.font", new Font("Serif", Font.BOLD, 25));
//System.out.println(UIManager.getCrossPlatformLookAndFeelClassName());
//UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
System.out.println(UIManager.getSystemLookAndFeelClassName());
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
JPanel panel =new JPanel( );
panel.add(new JLabel("Test Me"));
JFrame window=new JFrame("Test Fonts");
window.getContentPane().add(panel);
window.setSize(new Dimension(100,100));
window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// ..
// ..
window.setVisible(true);
---------- END SOURCE ----------
jdk 1.6
ADDITIONAL OS VERSION INFORMATION :
In Redhat Linux
EXTRA RELEVANT SYSTEM CONFIGURATION :
If a new font is set using UIManager.put(.key, new Font(.....) ,
A DESCRIPTION OF THE PROBLEM :
GTKLookAndFeel ignores this new font and shows the screens in the desktop font set in the OS. If some other look and feels is selected (Motif) changes in the font can be noticed in the screen displayed subsequently.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Execute the following code snippet.
-------------
UIManager.put("Label.font", null);
UIManager.put("Label.font", UIManager.get("List.font"));
UIManager.put("Label.font", new Font("Serif", Font.BOLD, 25));
//System.out.println(UIManager.getCrossPlatformLookAndFeelClassName());
//UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
System.out.println(UIManager.getSystemLookAndFeelClassName());
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
JPanel panel =new JPanel( );
panel.add(new JLabel("Test Me"));
JFrame window=new JFrame("Test Fonts");
window.getContentPane().add(panel);
window.setSize(new Dimension(100,100));
window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// ..
// ..
window.setVisible(true);
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The text displayed in Big and Bold Font.
ACTUAL -
The text displayed in normal Font.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
UIManager.put("Label.font", null);
UIManager.put("Label.font", UIManager.get("List.font"));
UIManager.put("Label.font", new Font("Serif", Font.BOLD, 25));
//System.out.println(UIManager.getCrossPlatformLookAndFeelClassName());
//UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
System.out.println(UIManager.getSystemLookAndFeelClassName());
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
JPanel panel =new JPanel( );
panel.add(new JLabel("Test Me"));
JFrame window=new JFrame("Test Fonts");
window.getContentPane().add(panel);
window.setSize(new Dimension(100,100));
window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// ..
// ..
window.setVisible(true);
---------- END SOURCE ----------