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.
有什么方法可以删除Component添加到CENTERaJPanel的 a BorderLayout,而不必引用它Component本身?
Component
CENTER
JPanel
BorderLayout
像这样的东西?
BorderLayout layout = (BorderLayout)panel.getLayout(); panel.remove(layout.getLayoutComponent(BorderLayout.CENTER));