Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-5098354

Setting L&F to Synth bef. bringing up a frame-JSpinner appears w/out a no.

XMLWordPrintable

      Setting the Look & Feel to Synth before bringing up a frame causes the JSpinner to appear without a number in it.
      I have a frame containing a JSpinner. In the constructor I have a method call to two local methods -setLookandFeel to -set the Look&Feel to Synth, and createAndShowGUI- This creates a frame containing a disabled and an enabled JSpinner.The setLookAndFeel & createAndShowGUI methods are invoked through the EDT.
      If the setLookAndFeel method is called before createAndShowGUI the JSpinners appear without any number in them.
      If the setLookAndFeel method is called after createAndShowGUI the JSpinners appear properly.
      Steps to reproduce:
      1.Unzip the attachment.
      2.Open the File SynthSpinnerTest1.java and observe that setLookAndFeel is called before the method createAndShowGUI.(line17 and line19)
      3.Execute the class SynthSpinnerTest1.
      4.Observe that the SynthSpinners appear without any number displayed in their textfield.-This is the Actual behaviour.
      5.Now open the File SynthSpinnerTest2.java in this the setLookAndFeel is called AFTER the method createAndShowGUI.(line19 and line21)
      6.Execute the class SynthSpinnerTest2.
      7..Observe that the SynthSpinners appear with number displayed in their textfield.-This is the Expected behaviour.
      I could reproduce this behaviour back upto tiger b32c.

            gromainsunw Guy Romain (Inactive)
            smandalisunw Srinivas Mandalika (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: