Java Component.show() / hide() are deprecated … why?

前端 未结 5 1404
星月不相逢
星月不相逢 2021-01-17 10:59

Does anyone know the reason why these Java swing methods are deprecated :

Component.show(); 
Component.hide();
5条回答
  •  天涯浪人
    2021-01-17 11:26

    The hide and show methods of java.awt.Component have been deprecated for a while.

    The proper way to set the visibility of a component is setVisible(boolean b)

提交回复
热议问题