-
Bug
-
Resolution: Unresolved
-
P4
-
None
-
6u12
-
generic
-
generic
OPERATING SYSTEMS:
All
FULL JDK VERSION:
java version "1.6.0_12"
Java(TM) SE Runtime Environment (build 1.6.0_12-b04)
Java HotSpot(TM) Client VM (build 11.2-b01, mixed mode)
DESCRIPTION:
Create a sample Swing app with 2 JTextFields. Set one as editable and the other as non editable, and run this using Nimbus L&F. Both of them are visually indistinguishable from each other.
Example code:
import java.awt.BorderLayout;
import java.awt.Container;
import javax.swing.JFrame;
import javax.swing.JTextField;
import javax.swing.SwingUtilities;
public class TextFieldTest extends JFrame {
private JTextField editable = new JTextField("editable");
private JTextField noneditable = new JTextField("uneditable");
public TextFieldTest() {
setDefaultCloseOperation(EXIT_ON_CLOSE);
Container pane = getContentPane();
noneditable.setEditable(false);
pane.setLayout(new BorderLayout());
pane.add(editable,BorderLayout.NORTH);
pane.add(noneditable,BorderLayout.CENTER);
pack();
setLocationByPlatform(true);
setVisible(true);
}
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
new TextFieldTest();
}
});
}
}
All
FULL JDK VERSION:
java version "1.6.0_12"
Java(TM) SE Runtime Environment (build 1.6.0_12-b04)
Java HotSpot(TM) Client VM (build 11.2-b01, mixed mode)
DESCRIPTION:
Create a sample Swing app with 2 JTextFields. Set one as editable and the other as non editable, and run this using Nimbus L&F. Both of them are visually indistinguishable from each other.
Example code:
import java.awt.BorderLayout;
import java.awt.Container;
import javax.swing.JFrame;
import javax.swing.JTextField;
import javax.swing.SwingUtilities;
public class TextFieldTest extends JFrame {
private JTextField editable = new JTextField("editable");
private JTextField noneditable = new JTextField("uneditable");
public TextFieldTest() {
setDefaultCloseOperation(EXIT_ON_CLOSE);
Container pane = getContentPane();
noneditable.setEditable(false);
pane.setLayout(new BorderLayout());
pane.add(editable,BorderLayout.NORTH);
pane.add(noneditable,BorderLayout.CENTER);
pack();
setLocationByPlatform(true);
setVisible(true);
}
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
new TextFieldTest();
}
});
}
}