Hello,
Ok I have looked all over and I cannot find anything on how to access components (such as buttons) in a cardlayout.
I want to be able to setVisible a button in gridbaglayout on a cardLayout
The buttons variable name is "Ship"
I found this line:
which I am figuring accesses the current card being shown, but how to access and change the items on there is baffling me??
I tried this:
but it errored out with
Can someone either explain it or give me a link to a place that does, cause so far all I have found on cardLayout tutorials is just how to set them up and add to them, but no tutorials that ive found show how to access the stuff on them once they are chosen.
thank you
Bob
Ok I have looked all over and I cannot find anything on how to access components (such as buttons) in a cardlayout.
I want to be able to setVisible a button in gridbaglayout on a cardLayout
The buttons variable name is "Ship"
I found this line:
CardLayout cl = (CardLayout) (card.getLayout());
which I am figuring accesses the current card being shown, but how to access and change the items on there is baffling me??
I tried this:
cl.Ship
but it errored out with
Package cl.Ship does not exist
Can someone either explain it or give me a link to a place that does, cause so far all I have found on cardLayout tutorials is just how to set them up and add to them, but no tutorials that ive found show how to access the stuff on them once they are chosen.
thank you
Bob