I am programming a gui in java and it has some buttons one of these buttons is options. I would like to have it so when you click on options it changes the gui to my options gui instead of opening it in another window.
How can I do this?
I am programming a gui in java and it has some buttons one of these buttons is options. I would like to have it so when you click on options it changes the gui to my options gui instead of opening it in another window.
How can I do this?
CardLayout, seen here, is a good choice. Alternatively, you can just remove() and revalidate(), as shown here.