SteppedComboBox problem



Hi all

I am using the SteppedComboBox that i got from here:

http://www.codeguru.com/java/articles/163.shtml

and when i compile it using JDK 5.0 with -Xlint:deprecation i get the deprecation warning about the SteppedComboBoxUI.show() method being deprecated.

If i change this method

  public void show() {
    ....

to

  public void setVisible(boolean isVisible){
    if(!false==isVisible){
      super.hide();
      return;
    }
    ....


it compiles fine with no deprecation warnings, but when i run it, and right when i click on the combo box to expand its popup list, i get a stack overflow exception shown at the end of this message.


Does anyone know how can i remove this deprecation message and yet keep this combo box working?

thanks for any insight.




Exception in thread "AWT-EventQueue-0" java.lang.StackOverflowError
at sun.awt.windows.WComponentPeer.getLocationOnScreen(Native Method)
at java.awt.Component.getLocationOnScreen_NoTreeLock(Component.java:1674)
at java.awt.Component.getLocationOnScreen(Component.java:1652)
at javax.swing.SwingUtilities.convertPointFromScreen(SwingUtilities.java:350)
at javax.swing.plaf.basic.BasicComboPopup.computePopupBounds(BasicComboPopup.java:1172)
at com.geopak.road.qdm.SteppedComboBoxUI$1.setVisible(SteppedComboBox.java:25)
at javax.swing.JPopupMenu.show(JPopupMenu.java:951)
at com.geopak.road.qdm.SteppedComboBoxUI$1.setVisible(SteppedComboBox.java:40)
at javax.swing.JPopupMenu.show(JPopupMenu.java:951)
at com.geopak.road.qdm.SteppedComboBoxUI$1.setVisible(SteppedComboBox.java:40)
at javax.swing.JPopupMenu.show(JPopupMenu.java:951)
at com.geopak.road.qdm.SteppedComboBoxUI$1.setVisible(SteppedComboBox.java:40)
at javax.swing.JPopupMenu.show(JPopupMenu.java:951)
at com.geopak.road.qdm.SteppedComboBoxUI$1.setVisible(SteppedComboBox.java:40)
at javax.swing.JPopupMenu.show(JPopupMenu.java:951)
at com.geopak.road.qdm.SteppedComboBoxUI$1.setVisible(SteppedComboBox.java:40)
......(this keeps repeating so many times....



P.S. SteppedComboBox.java:25=Rectangle popupBounds = computePopupBounds( 0, SteppedComboBox.java:40=show( comboBox, popupBounds.x, popupBounds.y ); .