Can anyone tell me how to go about coding for navigation between multiple JPanel
classes taking the event trigger from JButton
from the objects (panels) themselves? I have read about CardLayout
. The panel can be swapped from the events happening in the parent panel. What I want to achieve is on click of a button embedded in the panel, it should should disappear or a desired panel should be displayed. Can't seem to find a solution.
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
There is nothing about CardLayout that prevents switching cards from actions of children within the cards.
You can use JMenu with JMenuItems instead of to use the JButton for switching betweens Cards