-
Bug
-
Resolution: Fixed
-
P4
-
1.2.2
-
merlin
-
x86
-
windows_nt
Name: skT88420 Date: 10/15/99
Output for java -version:
java version "1.2.2"
Classic VM (build JDK-1.2.2-W, native threads, symcjit)
Output for java -fullversion:
java full version "JDK-1.2.2-W"
When the look and feel is changed to Motif during program
execution, the background color of the JScrollPane scrollbars
isn't set to the Motif background color. The program below
demonstrates this:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class A extends JFrame
{
public A()
{
super();
final JPanel p = new JPanel();
final JScrollPane sp = new JScrollPane(p,
ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS );
setContentPane(sp);
final JButton btn = new JButton("Change to Motif LF");
p.add(btn);
btn.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent ev)
{
try
{
UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel");
SwingUtilities.updateComponentTreeUI(sp);
btn.setEnabled(false);
}
catch(Exception ex)
{
ex.printStackTrace();
}
}
});
}
public static void main(String args[] )
{
A a = new A();
a.setSize(400, 400);
a.setVisible(true);
}
}
(Review ID: 96635)
======================================================================