java - show one panel after button is clicked and other panel when second button is clicked in the same frame -
I'm building Swing-based application, which consists of two buttons on the bottom -
now what I want is when clicked the first button it must be like for her actions, as shown below in the same frame label, showing Tekstfild and containing a button panel -
and it will show a panel in the same frame as shown below is when you click one button.
do not understand it How to implement this interface to provide this event by Headler and Action Listener .. So please let me know how I can store it. Any help would be appreciated .. Thank you
There are approaches 2
- < Li>
-
Entertainment based. Create a new panel with new content on the click button Remove one from the old container and add a newly created panel. Then call:
container.value (); Container.repaint ();
CardLayout based.
Create all panels (empty, field panels, panel with list) and add them to a container in the container> CardLayout (empty is a default). Swap the cards to show the required cards on the click button.
Comments
Post a Comment