What you have to know :
If I don't touch anything, this is working perfectly well.
But if I setVisible(true) the error message, the whole view moves up. Making me think that the setVisible(false) is not really hiding the item but "removing it from the panel".
How can I hide my item without "removing it from the panel" ?
Don't use setVisible
to show and hide elements. Pretty much only use that method for Frames. You rather want to use a TabbedPane
, where you don't show the tabs and don't have any borders, and simply switch the tab in your code to a pane which has nothing on it from a pane which has some components.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.