Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
AWTパッケージにはメソッドがあり、実際に異なるのはどこで同じ操作を行うのですかsetVisible()?show()
setVisible()
show()
このメソッドは、 javadocに示されているようshow()に、の非推奨バージョンです。setVisible()
また、その理由の説明はここにあります。
show() と hide() は、JDK バージョン 1.1 以降、setVisible(boolean) に優先して廃止されました。
setVisible はコンポーネントを表示および非表示にしますが、show() はコンポーネントのみを表示します。